我正在尝试将我们域的Web流量引导到Vhost站点,并将我们的内部Web站点分隔到只能在我们的专用网络中访问的目录,即192.168.x.x.
我在Apache上修改了Vhost配置,包括外部网站的基于名称的Vhost和Intranet的IP Vhost。不幸的是,我没有运气,Apache不喜欢它。
这是我修改过的Vhost配置文件。
NameVirtualHost *:80
<Directory "/home/webs">
Options +FollowSymLinks +Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
DocumentRoot /home/webs/foo
ServerName www.foo.com
ServerAlias foo.com
LogLevel warn
ErrorLog /home/webs/foo/error.log
CustomLog /home/webs/foo/logs/access.log combined
</VirtualHost>
NameVirtualHost 192.168.0.*:80
<Directory "/home/webs/OffCat">
Options +FollowSymLinks +Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost 192.168.0.*:80>
DocumentRoot /home/webs/OffCat
ServerName 192.168.0.15/OffCat
LogLevel warn
ErrorLog /home/webs/OffCat/logs/error.log
CustomLog /home/webs/OffCat/logs/access.log combined
</VirtualHost>
我将不胜感激。
谢谢,
Tony Cripps