开发者

Apache add a VirtualHost at an IP address /subdirectroy

开发者 https://www.devze.com 2023-03-25 00:48 出处:网络
Im trying to configure a VirtualHost so that I can go to 192.168.1.179/MYSITE. When I use this开发者_如何学Python code:

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号