Sam Carleton wrote:
> Matt,
>
> I do want to set things up as you suggested, but it isn't working.
> When I type in the IP address, I get the webdev.miltonstreet.com site
> on port 80 and the subversion site on port 443. Here is what I have:
>
> Listen 80
> Listen 443
>
> NameVirtualHost 192.168.0.4:80
>
> ServerAdmin [EMAIL PROTECTED]
> ServerName internal.miltonstreet.com
>
> DocumentRoot "/http/www/internal"
>
> <VirtualHost _default_:80>
> ServerName internal.miltonstreet.com
> DocumentRoot "/http/www/internal"
> </VirtualHost>
>
> <Directory "/http/www/internal">
> Options None
> AllowOverride None
> Order allow,deny
> Allow from all
> </Directory>
>
> <VirtualHost webdev.miltonstreet.com:80>
>
> ServerName webdev.miltonstreet.com
> DocumentRoot "/http/www/webdev.miltonstreet.com"
>
> ErrorLog /var/log/apache2/webdev.miltonstreet.com-error_log
> CustomLog /var/log/apache2/webdev.miltonstreet.com-access_log combined
>
> <Directory "/http/www/webdev.miltonstreet.com">
> Options Indexes FollowSymLinks
> AllowOverride None
> Order allow,deny
> Allow from all
> </Directory>
>
> </VirtualHost>
>
> <VirtualHost *:443>
> DocumentRoot "/http/www/internal"
> </VirtualHost>
>
> <VirtualHost subversion.miltonstreet.com:443>
>
> ServerName subversion.miltonstreet.com
> DocumentRoot "/http/subversion/wwwRoot"
>
> <Directory /http/subversion/wwwRoot>
> Order Allow,Deny
> Allow from all
> </Directory>
>
> # more stuff here
>
> </VirtualHost>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> " from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
I suggest you dont bother with default for now, just comment that out,
and make the first vhost your private IP, then the second IP your public IP,
I know it sounds weird but it will cover both bases. It will work, now
the default will never be needed, if no hosts - then one of the IP
addresses.
Let me know if for some reason it doesnt, Mass irtual Hosting is a bit
different and I may have led you up the garden poath before, after
checking it appears I dont use default anywhere, but just hard code the IPs.
Listen 80
Listen 443
NameVirtualHost 192.168.0.4:80
ServerAdmin [EMAIL PROTECTED]
ServerName internal.miltonstreet.com
DocumentRoot "/http/www/internal"
#in the next two you can choose whether to have servername equal to IP
or set it to the IP
<VirtualHost 192.168.0.4:80>
# ServerName 192.168.0.4
ServerName internal.miltonstreet.com
DocumentRoot "/http/www/internal"
</VirtualHost>
<VirtualHost your.public.ip.here:80>
# ServerName your.public.ip.here
ServerName internal.miltonstreet.com
DocumentRoot "/http/www/internal"
</VirtualHost>
#this just has some placeholder right?
<Directory "/http/www/internal">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
#now the only way that a request will come to here is if it matches.
<VirtualHost webdev.miltonstreet.com:80>
ServerName webdev.miltonstreet.com
DocumentRoot "/http/www/webdev.miltonstreet.com"
ErrorLog /var/log/apache2/webdev.miltonstreet.com-error_log
CustomLog /var/log/apache2/webdev.miltonstreet.com-access_log combined
<Directory "/http/www/webdev.miltonstreet.com">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost 192.168.0.4:443>
# ServerName 192.168.0.4
DocumentRoot "/http/www/internal"
</VirtualHost>
<VirtualHost your.public.ip.here:443>
# ServerName your.public.ip.here
DocumentRoot "/http/www/internal"
</VirtualHost>
<VirtualHost subversion.miltonstreet.com:443>
ServerName subversion.miltonstreet.com
DocumentRoot "/http/subversion/wwwRoot"
<Directory /http/subversion/wwwRoot>
Order Allow,Deny
Allow from all
</Directory>
# more stuff here
</VirtualHost>
now just have
192.168.0.4 subversion.miltonstreet.com webdev.miltonstreet.com
--
Matthew Farey
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]