Firstly, intall the "passenger" gem
> sudo gem install passenger > sudo passenger-install-apache2-module
you would see the wizard installation, follow the instructions step by step :)
now, passenger is installed.
Copy these lines.
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-3.0.19/ext/apache2/mod_pa$ PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-3.0.19 PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/rubyThen, adding a chuck of code before to "httpd.conf"
sudo nano /etc/apache2/httpd.conf
Now, edit Vhost
sudo nano /etc/apache2/httpd.conf
find and uncomment this line code:
"include /private/etc/apache2/extra/httpd-vhosts.conf"
Next, we need to adding new local domain
sudo nano /etc/hostsAdd new your domain.
## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost 127.0.0.1 projectname.localEdit your Vhost file
sudo nano /etc/apache2/extra/httpd-vhosts.confAdd codes below:
< VirtualHost *:80>
ServerName projectname.local
DocumentRoot "/Users/oya_andriani/Documents/My Labs/depot/public"
RailsEnv development
RailsBaseURI /
< Directory "/Users/oya_andriani/Documents/My Labs/depot/public/">
AllowOverride None
Order allow,deny
Allow from all
< /Directory>
< /VirtualHost>
Finaly, restart your apache
sudo apachectl retartIt's done, access your local domain with your browser.
No comments:
Post a Comment