Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : Using multiple domains



Normal Mode | Print  

 Using multiple domains (4 Replies, Read 4461 times)
unclepips
Group: Member
Post Group: Newbie
Posts: 5
Status:
I have used Apache for serving websites on our servers for several years now, with a single public IP address.

To achieve this, I have always modified the HTTPD-VHOSTS.CONF file similar to below:-

For Domain 1:-
ServerName domain1.com
ServerAlias www.domain1.com
<Directory "d:\htdocs\domain1">

For Domain 2:-
ServerName domain2.com
ServerAlias www.domain2.com
<Directory "d:\htdocs\domain2">

etc.

The DNS for each domain was set to the single public IP address.
Then whenever you typed www.domain1.com it would serve the files in d:\htdocs\domain1  and if you typed www.domain2.com it would serve the files in d:\htdocs\domain2 etc.

I have now setup AMPPS and added the domains but it appears that the only way to get the files served would be to type:-

www.domain1.com\domain1
www.domain2.com\domain2

etc.

When I open the HTTPD-VHOSTS.CONF file it shows what I would expect:-

NameVirtualHost www.domain1.com:80
<VirtualHost www.domain1.com:80>
<Directory "d:/ampps/www/domain1">
    Options FollowSymLinks Indexes
    AllowOverride All
    Order deny,allow
    allow from All
</Directory>
ServerName www.domain1.com
ServerAlias www.domain1.com
ScriptAlias /cgi-bin/ "d:/ampps/www/domain1/cgi-bin/"
DocumentRoot "d:/ampps/www/domain1/"
ErrorLog "D:/Ampps/apache/logs/www.domain1.com.err"
CustomLog "D:/Ampps/apache/logs/www.domain1.com.log" combined
</VirtualHost>

But if I type www.domain1.com I get the files in the root of www and NOT the files in the folder domain1.

In the main httpd.conf file it shows:-

ServerRoot "D:/Ampps/apache"
DocumentRoot "D:/Ampps/www"

Hopefully I am being a bit thick, and have missed something obvious in the setup, but to be honest, I have been over and over this and as far as I can see it should work.

Any help would be appreciated, thanks in advance.

-----------------------
If it ain't broke...... Fix it until it is!
IP: --   


Threads
 unclepips   Using multiple domains (4 Replies, Read 4461 times)
    |--  tidus   Hi, Yes. This...   on February 24, 2012, 1:30 pm
    |--  unclepips   Thanks Tidus for...   on February 24, 2012, 5:01 pm
    |--  tidus   Hi, Strange. We...   on February 25, 2012, 5:26 am
    |--  unclepips   I did as...   on February 25, 2012, 9:24 am

« Previous    Next »

Normal Mode | Print  



Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 23, 2013, 4:29 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.451