Forum Moderators: bakedjake
I have a linux / apache box with currently 3 ip's assigned to it.
I am using one ip as a virtual server to serve more than one site.
My question is how do I view site 2 before the dns changes propagate?
Here's my config for site 2
(names changed to protect the innocent)
********************************************************
<VirtualHost 111.111.11.11>
DocumentRoot "/home/sites/www.lamedomain.com/web"
ServerName lamedomain.com
ServerPath /www.lamedomain.com/
ServerAdmin info@lamedomain.com
ScriptAlias /cgi-bin/ /home/sites/www.lamedomain.com/cgi-bin/
ErrorLog /home/sites/www.lamedomain.com/logs/error_log
TransferLog /home/sites/www.lamedomain.com/logs/access_log
LogFormat "combined"
<Directory "/home/sites/www.lamedomain.com">
AllowOverride all
</Directory>
ServerAlias lamedomain.com
</VirtualHost>
*******************************************************
I know theres some way to do it as I have viewed virtual sites before with something like ipaddress/~virtualsite/ but cant find any examples or info on making it work.
Any and all help is appreciated.
Thanks
Be sure to read Marcia`s WebmasterWorld Welcome and Guide to the Basics [webmasterworld.com] post.
To view the page from a certain computer you could just add a new entry to that computerīs
/etc/hosts or %SystemRoot%\system32\drivers\etc\hosts file. ipaddr name To view the virtual host using ipaddress/~virtualsite/ you need to map virtualsiteīs DocumentRoot [httpd.apache.org] to that URI.
Andreas
AliasMatch ^/domain/([^/]+)(/(.*))? /home/sites/$1/web/$3 Then use this to get you there:
[your_ip...]
This is a set up once and forget - will work will any future domains you set up.
You can replace the word 'domain' with anything you want, just know that no one will be able to use a directory with that name on their own sites.
I really dont get what you are saying or maybe its not that you understood what I said?
As you can see by the config it is maped correctly, and yes its added to the dns on that machine. The question was / is
How do I view that site before the changes have propagated throught the internet, IE: I changed name servers and would like to see the site on the new server without assigning it a ip address of its own?
The mapping I was referring to will be only necessary when you want to view your virtualhost as a directory from the main domain. jamesa provided an example of how to achieve this mapping.
HTH Andreas
My question is how do I view site 2 before the dns changes propagate?
In a sense, the DNS changes have already propagated. If you telnet to your server and ping the newly added domain, you'll certainly see the expected results. The change just may not have propagated far enough for your "usual" named server to see them yet. The easy solution, then, is to change your usual named server.
When you connect to the Internet through your ISP, you're using their named servers (typically set to auto-assign). In your connection setup, which is a little different for each OS, simply change it from auto-assign to YOUR named servers. When you reconnect, you'll be getting all your DNS information from a server where the changes HAVE propagated (and did so instantly).