Reputation: 1433
Used railsready, then passenger w/ apache2, finally copied my app to /home/myapp.
Inserted the passenger config lines into /etc/apache2/apache.conf at the bottom along with my virtual host settings:
The servers name is rails.
LoadModule passenger_module /home/myapp/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /home/myapp/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7
PassengerRuby /home/myapp/.rvm/wrappers/ruby-1.9.2-p180/ruby
<VirtualHost *:80>
ServerName rails
DocumentRoot /home/myapp/public
</VirtualHost>
All I get is the apache "It Works" page when I open the IP address. Am I doing something wrong?
Upvotes: 0
Views: 487
Reputation: 7714
You declared a ServerName
so you must use it to access this VirtualHost (and not the IP address as you mentioned). Connect to http://rails/
For this to work, the hostname rails
must resolv to your server's IP. You can add it to you hosts file or use a real domain name configured to resolve to this IP.
Or you can change the DocumentRoot
of the default VirtualHost
of Apache, and then it will always respond with the Rails app.
Upvotes: 2
Reputation: 9728
Try:
<VirtualHost *:80>
ServerName rails
DocumentRoot /home/myapp/public
<Directory /var/www/robox/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
Also, you might need to disable the default site. In Ubuntu you can do this with:
[sudo] a2dissite default
[sudo] service apache2 restart
Upvotes: 1