Have more than one sites on the same server.

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

User avatar
genetix
Forum Contributor
Posts: 115
Joined: Fri Aug 01, 2003 7:40 pm
Location: Sask, Regina
Contact:

Post by genetix »

Servers running windows,
Apache, and mysql are running,
I'm gonna go fiddle with the config file again.
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Post by liljester »

ok then for your paths to your dirs, you should use the windows paths..
that being said, when you specifiy the path in your conf file, use

"c:/www/webdummy" instead of "/www/webdummy/"

if your still having trouble, post your httpd.conf and ill have a look.
User avatar
genetix
Forum Contributor
Posts: 115
Joined: Fri Aug 01, 2003 7:40 pm
Location: Sask, Regina
Contact:

Post by genetix »

It kind of works now except any site I go to always links me to my web dummy site.

If I go to generation-x.uni.cc(normally .ca but Site is up and I dont want to take it off hosting until it will be up for sure) but when I go to generation-x.uni.cc it always takes me to my web dummy site.

localhost also takes me to my web dummy site and so does 24.72.3.251

Code: Select all

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

<VirtualHost *> 
    ServerAdmin webmaster@webdummy.net 
    DocumentRoot c:/AppServ/www/webdummy/
    ServerName www.webdummy.net
    ErrorLog c:/AppServ/apache/logs/webdummy.net-error_log 
    CustomLog c:/AppServ/apache/logs/webdummy.net-access_log common 
</VirtualHost> 

<VirtualHost *> 
    ServerAdmin webmaster@generation-x.ca 
    DocumentRoot c:/AppServ/www/generation-x/
    ServerName generation-x.uni.cc
    ErrorLog c:/AppServ/apache/logs/generation-x.ca-error_log 
    CustomLog c:/AppServ/apache/logs/generation-x.ca-access_log common 
</VirtualHost>
I'm guessing its the IP:port I have to edit now?

Apache is working again though.
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Post by liljester »

this is what i have in my conf file for virtual hosts (i added in your info).. mine works with this config. if it works, try adding back in your log files

Code: Select all

NameVirtualHost *:80
<VirtualHost *:80>
    ServerAdmin webmaster@webdummy.net
    DocumentRoot "c:/AppServ/www/webdummy"
    ServerName www.webdummy.net:80
</VirtualHost>
<VirtualHost *:80>
    ServerAdmin webmaster@generation-x.ca
    DocumentRoot "c:/AppServ/www/generation-x"
    ServerName generation-x.uni.cc:80
</VirtualHost>
User avatar
genetix
Forum Contributor
Posts: 115
Joined: Fri Aug 01, 2003 7:40 pm
Location: Sask, Regina
Contact:

Post by genetix »

It still wont work. It always sends everything to the first folder(web dummy). I tried all my connection urls's. They all lead to the same place.

localhost
webdummy.net
generation-x.uni.cc
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

It might be that your browser isn't sending the proper information for apache to make the correct domain decision.. :?:
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Post by liljester »

wait a sec. are you trying 'www.webdummy.net, or 'webdummy.net' in your browser? your virtual host is looking for 'www.webdummy.net'... if it doesnt find a match in your virtual hosts, it will default to the default doc root... i think

also, could you post your whole httpd.conf file?
Last edited by liljester on Wed Jul 21, 2004 4:06 pm, edited 1 time in total.
User avatar
genetix
Forum Contributor
Posts: 115
Joined: Fri Aug 01, 2003 7:40 pm
Location: Sask, Regina
Contact:

Post by genetix »

I'm using:
http://www.webdummy.net,
generation-x.uni.cc
localhost
Post Reply