Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache virtualhosts? help, have i got it right? 2

Status
Not open for further replies.

noellees1

Programmer
Feb 2, 2004
383
GB
Hi, i have setup a webdomain spanoweb.com and also created a cname for this (subdomain) paulself.spanoweb.com this all works ok spanoweb resolved to my home computer but heres the problem, i went to setup virutal hosting and added these lines:

<VirtualHost *>
UseCanonicalName Off
ServerAdmin noel@spano.co.uk
ServerName ServerAlias spanoweb.com
DocumentRoot "c:/program files/apache group/apache2/htdocs/"
ScriptAlias /cgi-bin/ "D:/program files/apache group/apache2//cgi-bin/"
</VirtualHost>

<VirtualHost *>
UseCanonicalName Off
ServerAdmin noel@spano.co.uk
ServerName ServerAlias paulself.spanoweb.com
DocumentRoot "c:/program files/apache group/apache2/htdocs/paulself"
ScriptAlias /cgi-bin/ "c:/program files/apache group/apache2/paulself/cgi-bin/"
</VirtualHost>

except when there enabled like that they both either go to the home folder and ignore the one which is taking it to the paulself id, what is wrong, are these namebased or ip based as if there namebased i still have #NameVirtualHost * like that will i need to remove that? thanks
Also any ideas will help. or other ways to do this

P.S i am using * instead of ip because i have a dynamic ip


The way web design should be
 
you will need a seperate ip or a different port for the 2nd site, browser is looking at ur ip on port 80 for both of the urls. if you do not have a 2nd ip, use a redirect to port 81 denoted by *:81 for your ip adress on either 1 or the other sites
 
Zippyflyer said:
you will need a seperate ip or a different port for the 2nd site, browser is looking at ur ip on port 80 for both of the urls. if you do not have a 2nd ip, use a redirect to port 81 denoted by *:81 for your ip adress on either 1 or the other sites

That is incorrect, this example is name based virtualhosts.

To run name based virtualhosts, you do not need a different port or a different IP address, you can run an unlimited amount of sites on the same IP and port.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Thanks for the posts guys ive just enabled namebased virtualhosts and it works now, im now working on how to enter details via a web site such as a control panel, ive heard you have had a lot of success wullie with yours, any ideas or control panel programs which will work with apache on a windows server? thanks

The way web design should be
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top