Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Sorry if this sounds pretty simple, I'm new to Virtualmin and running servers in general. I recently purchased a VPS and installed Virtualmin with no problems. I then installed mod_rails and uploaded my first rails app, which I got working by adding the following to my apache httpd.conf file:

<VirtualHost *:80>
ServerName testing.mydomain.com
DocumentRoot /home/myapp/public    
<Directory /home/myapp/public>
Allow from All
AllowOverride all             
Options -MultiViews           
</Directory>
RailsBaseURI /
</VirtualHost>

I then tried adding a virtual server through Virtualmin, using mydomain.com. Now, the site this created (plus several sub-servers) and working as expected. However, my original Rails app is no longer accessible.

The URL now sends me to the parent application (ie mydomain.com)

The Rails app is not located within the parent's application directory, would this be a problem?

share|improve this question
add comment

1 Answer

Try using an .htaccess file in the parent directory of the domain running the rails app to tell mod_rails where to look for the app instead of doing it directly in your httpd.conf file. The lines would look like this:

PassengerEnabled on
PassengerAppRoot /path/to/your/application/directory

Make sure you have "allowoverride" enabled in your httpd.conf as well.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.