Hi On my vitual server im running two domains. With the ip of the virtual server im able to preview the main domain, but how can i preview the second domain. Are there any tools available for this or is there a certain command line. Thanks in advance
Configure the site in apache. If you only have 1 ip address, use name based virtual hosting (google will give you plenty of info, as will the apache documentation). Since you are using a name, but not a live domain, add the name/ip combination to your hosts file. so your hosts file could say www.mytestsite.com 246.132.194.589 Then when you open up the browser on your computer, and go to www.mytestsite.com it will actually go to your server at address 246.132.194.589 When you want to go live, you'll probably need to adjust your apache config, but that should do it for now. Alternatively, you could set up a subdomain for your live site - like test.yourdomain.com and configure your test site to be at test.yourdomain.com
What OS is your server using? If it's unix, then nevets is probably on target, if not, then he's way off in left field.
Virtual domains are identified by the Host HTTP header. For example, you you wanted to see HTTP headers returned by your virtual domain, you can type this at the command line: $ telnet my-domain.com 80 GET / HTTP/1.1<Enter> Host: my-domain.com<Enter> <Enter> Code (markup): Keep in mind, once you are connected, you cannot use or delete keys anymore and if you make a mistake typing any of this, you will have to start all over again. In general, all browsers will form the Host header based on what you typed in the URL line. J.D.
Does your above command line work as well for SSH. I jsut read on the help page of my host that they dont support telnet anymore. Cause of security reasons.
If your machine is visible from your office/home connection, you can use telnet to hit your public IP address. If you are just testing, first, SSH to your machine, then use telnet inside. Telnet isn't secure and it's a good thing your hosting company doesn't allow you to connect from the outside. J.D.
Ok so i first need to start up SSH and once im inside on the virtual server i should use telnet right?
It all depends on whether you can see your virtual website from outside. If you can, then just run telnet on your office/home machine and hit your machine in IDC. You can use the public IP address if your DNS isn't set up yet (e.g. telnet <public-ip-address> 80). If you are just setting your machine up and this website isn't visible from the outside, then SSH to your machine, then run telnet from inside (you can use either public or private IP address in this case). You can also turn on logging in telnet to capture the entire HTML and view it later in a browser (just don't forget to strip off the headers in a text editor). J.D.
The other web server is still about 20% of the market http://news.netcraft.com/archives/web_server_survey.html J.D.
What if i have two different directories would that make a difference. The DNS isnt resolved yet. I got a html directory and a htnl2 directory , in this last one my new website is located.
I'm assuming your test virtual website is configured to point to html2 and your main website points to html. If this is correct, then you can connect to the same IP address and the web server will pick the website based on the value of the Host header. For example, telnet 127.0.0.1 80 GET /index.html HTTP/1.0 Host: my-host-1.com will return the file test.html from the root directory of the my-host-1.com website (e.g. html). telnet 127.0.0.1 80 GET /index.html HTTP/1.0 Host: my-host-2.com will return the file index.html from the root directory of the my-host-1.com website (e.g. html2) You can also modify your hosts file or add an entry to your local DNS server and create a temporary domain name you are planning to use for the new website. In this case, you will just be able to access your test website using any browser. J.D.