XtremeGamer99
July 31st, 2009, 04:23 PM
Hello,
I have a home server that's serving up two different blogs via name-based virtual hosting (blog1.com and blog2.com go to their respective directory roots). The server itself has one public IP.
I'd like to have a "adminitrative" site that is accessible by a port number (and HTTP authentication of course), no matter which domain I use.
EG:
blog1.com - /home/www/blog1.com
blog2.com - /home/www/blog2.com
blog1.com:99 OR blog2.com:99 - /home/www/admin
This is what I have currently:
Listen 80
Listen 99
NameVirtualHost *:80
NameVirtualHost *:99
<Directory /home/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<VirtualHost *:80>
ServerName blog1.com
DocumentRoot /home/www/blog.com
</VirtualHost>
<VirtualHost *:80>
ServerName blog2.com
DocumentRoot /home/www/blog2.com
</VirtualHost>
<VirtualHost *:99>
DocumentRoot /home/www/admin
</VirtualHost>
And it doesn't work. How would I do this?
ALSO: No reason to post a new topic. I'm using DYNDns.org to direct the two blogs to my IP address. Currently, my router is the one that does the IP address updating. However, I can only update one hostname (blog1.com) while the other hostname (blog2.com) doesn't get updated if my IP address changes. Is there a linux program that will allow to to update multiple DYNDns.org hostnames?
I have a home server that's serving up two different blogs via name-based virtual hosting (blog1.com and blog2.com go to their respective directory roots). The server itself has one public IP.
I'd like to have a "adminitrative" site that is accessible by a port number (and HTTP authentication of course), no matter which domain I use.
EG:
blog1.com - /home/www/blog1.com
blog2.com - /home/www/blog2.com
blog1.com:99 OR blog2.com:99 - /home/www/admin
This is what I have currently:
Listen 80
Listen 99
NameVirtualHost *:80
NameVirtualHost *:99
<Directory /home/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<VirtualHost *:80>
ServerName blog1.com
DocumentRoot /home/www/blog.com
</VirtualHost>
<VirtualHost *:80>
ServerName blog2.com
DocumentRoot /home/www/blog2.com
</VirtualHost>
<VirtualHost *:99>
DocumentRoot /home/www/admin
</VirtualHost>
And it doesn't work. How would I do this?
ALSO: No reason to post a new topic. I'm using DYNDns.org to direct the two blogs to my IP address. Currently, my router is the one that does the IP address updating. However, I can only update one hostname (blog1.com) while the other hostname (blog2.com) doesn't get updated if my IP address changes. Is there a linux program that will allow to to update multiple DYNDns.org hostnames?