Question

I am trying to direct web traffic for our domain to a Vhost site and our internal web site to separate directory that is only accessible within our private network,i.e 192.168.x.x.

I have modified Vhost configuration on Apache to include a name-based Vhost for the external website and a IP Vhost for the Intranet. No far I have had no luck, Apache does not like it.

Here is my modified Vhost config file.

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>

I would appreciate any help.

Thanks,

Tony Cripps

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top