Apache add a VirtualHost at an IP address /subdirectroy
Im trying to configure a VirtualHost so that I can go to 192.168.1.179/MYSITE.
When I use this开发者_如何学Python code:
<VirtualHost *:80>
ServerName http://192.168.1.179.com
DocumentRoot /usr/local/www/apache22/data/PI_Admin
<Directory /usr/local/www/apache22/data/PI_Admin>
Allow from all
</Directory>
RailsBaseURI /pi_admin
<Directory /usr/local/www/apache22/data/PI_Admin/pi_admin>
Options -MultiViews
</Directory>
</VirtualHost>
It replaces the entire up with my document root. What id like to do is 192.168.1.179/pi_admin, but that doesnt work.
Any suggestions?
Your configuration means you have a DNS 192.168.1.179.com with /usr/local/www/apache22/data/PI_Admin being the '/' url for this website.
Don't use named base virtualhosts if you use IP based ones, maybe simply use the default virtualhost (will be used if no names used in your HTTP requests match any named base virtualhost).
精彩评论