I have an rails application setup on a linux server which works fine and I can access it through:
machine.mydomain.com
the passenger setup file (/etc/apache2/httpd.conf) has this section:
<VirtualHost *:80>
ServerName machine.mydomain.com
DocumentRoot /var/www/public
<Directory /var/www/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
I added a new rails app under the same directory (it will not be there indefinately, it's only for testing) under the subdirectory sss and added a new section in the file:
<VirtualHost *:80>
ServerName machine.mydomain.com/sss
DocumentRoot /var/www/sss/public
<Directory /var/www/sss/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
What am I doing wrong?
Assuming you're using rack, you have to change your httpd.conf like this:
<VirtualHost *:80>
ServerName machine.mydomain.com
DocumentRoot /var/www/public
<Directory /var/www/public>
AllowOverride all
Options -MultiViews
</Directory>
RackBaseURI /sss
<Directory /var/www/sss/public>
Options -MultiViews
</Directory>
</VirtualHost>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.