2 websites 2 domains
Posted by: sikwithcarts (---.tukw.qwest.net)
Date: September 17, 2009 12:46AM

Hey, well i have two websites im trying to host on my WAMP server.

one is in the "almir" folder

and the other is in the "cmdowrz" folder

all that are in the "www" folder.

i uncommented the vhost line in httpd.conf and then edited my /extra/httpd-vhosts.conf file to this:

<VirtualHost *:80>
ServerName domain1.com
ServerAlias domain1.com almir
DocumentRoot C:/webserver/www/almir
ErrorLog C:/webserver/www/almir/logs/error.log
CustomLog C:/webserver/www/almir/logs/access.log common
</VirtualHost> 
<VirtualHost *:80>
ServerName www.domain2.com
ServerAlias domain2.com domain
DocumentRoot C:/webserver/www/cmdowrz
ErrorLog C:/webserver/www/cmdowrz/logs/error.log
CustomLog C:/webserver/www/cmdowrz/logs/access.log common
</VirtualHost>

(domain1/domain2 are replaced with my actual domains that i have bought.)

when i go to domain1.com it works, but when i try going to domain2.com it takes me to the domain1 website.

ive tried many things before finally posting. but i cant figure it out.

any help?


btw, im using the newest version of wampserver with php 5.2.9-2 and mysql 5.1.32 in case you needed to know.

OH and when it put domain2 first in vhosts, both domains go to domain2.



Edited 2 time(s). Last edit at 09/17/2009 12:48AM by sikwithcarts.

Options: ReplyQuote
Re: 2 websites 2 domains
Posted by: yfastud (Moderator)
Date: September 17, 2009 01:38AM

to setup access, follow this
[blog.jlbn.net]

to setup vh, follow this
[blog.jlbn.net]

to setup dns, follow this
[blog.jlbn.net]

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: 2 websites 2 domains
Posted by: sikwithcarts (---.tukw.qwest.net)
Date: September 17, 2009 01:57AM

People can already access site one.

and i already set up my vhosts.

and i dont need DNS, my domain host lets me just change my a settings to my ip address.



domain 1 is linked to www/almir

and domain2 is linked to www/cmdowrz

but when i type domain 2 in it goes to www/almir not www/cmdowrz






i used to have this working, but then i updated WAMP server and now this happens.

Options: ReplyQuote
Re: 2 websites 2 domains
Posted by: yfastud (Moderator)
Date: September 17, 2009 02:04AM

Quote

and i already set up my vhosts.

and i dont need DNS, my domain host lets me just change my a settings to my ip address.
if you set them up properly, you don't have that problem and you know it can't just post here 1 or 2 lines to tell you everything winking smiley

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: 2 websites 2 domains
Posted by: sikwithcarts (---.tukw.qwest.net)
Date: September 17, 2009 02:29AM

the first post is exactly what is in my httpd-vhost.conf


and i know i've done it right because i've done it plenty of other times on mine, and helping friends.

Options: ReplyQuote


Sorry, only registered users may post in this forum.