installing two websites two domains one ip address on same machine

Permalink
We are installing two websites with two different domains and one static ip address on same machine.

We place each website in its own directory. plus our old site is in the www folder by itself. When we call up the domain on the net it is either serving the old site or depending on the configuration it is not finding the page peroid.

Help! here is our vhost file.
NameVirtualHost *:80

<VirtualHost *:80>
ServerNamehttp://www.h.org
DocumentRoot "C:/wamp/www/h.org"
</VirtualHost>

<VirtualHost *:80>
ServerNamehttp://www.e.org
DocumentRoot "C:/wamp/www/e.org"
</VirtualHost>

<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/wamp/www"
</VirtualHost>

Now we have been told to change the base url. and we have done that in the site.php. but still the smae problem.

 
wizardontherun replied on at Permalink Reply
wizardontherun
here is what I use.
File: vhosts



<VirtualHost *:80>
ServerNamehttp://www.myperryman.com
DocumentRoot "C:/wotr/Sites/www.myperryman.com"
DirectoryIndex index.php
ErrorLog "logs/www.myperryman-error.log"
CustomLog "logs/www.myperryman-access.log" common
<Directory "c:/wotr/sites/www.myperryman.com">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost *:80>
ServerNamehttp://www.dawnalexanders.com
DocumentRoot "C:/wotr/Sites/www.dawnalexanders.com"
DirectoryIndex index.php
ErrorLog "logs/www.www.dawnalexanders-error.log"
CustomLog "logs/www.dawnalexanders-access.log" common
<Directory "c:/wotr/sites/www.dawnalexanders.com">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
pastor replied on at Permalink Reply
there must be something that I am missing as with this config now even apache will not start.
Remo replied on at Permalink Reply
Remo
base url is usually equal to ServerName.. nothing else to do there.

But if apache doesn't start it probably have another problem but without some more information it's pretty much impossible to help you.

- error log?
- apachectl configtest?
pastor replied on at Permalink Reply
base url has to be the same as in the Vhost file as well as the Site.php?
pastor replied on at Permalink Reply
prior to me switching the vhost file it worked. then the suggestion above caused it to not start.
So I just changed the vhost file back to original and apaches is back working but I still can not host the two sites at once. It seems that the sites work on localhost but are not available on the web.
pastor replied on at Permalink Reply
I have tried almost everything that everyone is saying including redoing the whole thing over and still the smae results.
pastor replied on at Permalink Reply
here is the error I am getting.

[Mon Feb 15 23:49:06 2010] [error] (EAI 11001)APR does not understand this error code: Could not resolve host namehttp://www.yahwehs-tabernacle.org -- ignoring!
pastor replied on at Permalink Reply
Did you do anything with site.php or with HTTPD.conf in apache?
wizardontherun replied on at Permalink Reply
wizardontherun
iF asking me, no this is the same layout i use on 5 differnt servers for the vhost file, some with 50 plus domains/sites. If apache fails to start there is always somethint in the error.log file. must times apache dies is for dump erros in the config / typos
no changes needed for site.php, and httpd.confg just uncommented the vhosts file load.
pastor replied on at Permalink Reply
Ok let me outline what we have done.
we have uncommented the Vhost file. We have tried the Vhost files different layouts and none of them ahve worked.
In the mist of changing vhost files sometimes Apache worked sometimes it did not.
What we did get was a site work work on the net and it only works this way. http://www.example.org/wxample.org.... when we try ithttp://www.example.org nothing.

For some reason it keeps looking for the directory example.org example.org.

Also let me say that we originallly installed this in its own folder and not in www there was an old site there in wamp. So we are using wamp to host these sites.