Link to home
Start Free TrialLog in
Avatar of Jason Yu
Jason YuFlag for United States of America

asked on

how to setup four virtual hosts on a apache + Drupal webserver

I have a cloned dev/qa server which is a clone of the production webserver. On the production server, there is only one website and one domain name. On this dev/qa box, we want to set up four websites on it. The domain names are different:

Right now, two of the four domain names are working but two of them are not. How can I troubleshoot this issue.

The domain names are as followings:

1. dorrington.testdomain.org/devw.testdomain.org  ---> both are working

2. devcov.testdomain.org  --> not working

3. devcal.testdomain.org  ---> not working

4. devleg.testdomain.org  ---> working.

I uploaded the httpd.conf file in this post, please see the attachment for the configuration file.
httpd.conf.txt
SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jason Yu

ASKER

how to restart apache and drupal service?

thanks.
Drupal isn't a service
apache can be a service..
linux
sudo service apache2 restart
Got this message:

[root@dorrington conf]# service apache2 restart
apache2: unrecognized service
You have new mail in /var/spool/mail/root
[root@dorrington conf]# service apache restart
apache: unrecognized service
[root@dorrington conf]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@dorrington conf]#
Its still not working. two of them work, another two points to the first one.


<VirtualHost *:80>
    ServerAdmin ktan@testdomain.org,bhoang@testdomain.org
    DocumentRoot /var/www/lac2014/html
    ServerName devw.testdomain.org
    ServerAlias devw dorrington.testdomain.org dorrington
    <Directory "/var/www/lac2014/html">
      AllowOverride All
    </Directory>
    ErrorLog /var/www/lac2014/logs/error.log
</VirtualHost>



<VirtualHost *:80>
   ServerAdmin ktan@testdomain.org,bhoang@testdomain.org
   DocumentRoot /var/www/duals/html
   ServerName devcal.testdomain.org
   ServerAlias  devcal
   ErrorLog /var/log/httpd/error.log
   <Directory "/var/www/duals/html">
     AllowOverride All
   </Directory>
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /var/www/testdomainx/html
    ServerName devcov.testdomain.org
    ServerAlias devcov
    <Directory "/var/www/testdomainx/html">
      AllowOverride All
    </Directory>
    ErrorLog /var/www/testdomainx/logs/error.log
    # CustomLog /var/log/httpd/access.log
</VirtualHost>


<VirtualHost *:80>
  DocumentRoot /var/www/html
  ServerName devleg.testdomain.org
  ServerAlias devleg
  ErrorLog /var/www/logs/legacy_error.log
</VirtualHost>
Is there any other file config drupal activity?

the second one "deval" and the third one "devcov" point to the wrong website which is the first documentroot ..

Besides, I notice when I put the second and third one, the address shows https://deval.testdomain.org.

Please advise.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
How can I find the frugal admin center?

Thanks.
After I log into drupal admin's console, I couldn't find the place where I can set up virtual directories.

Could you help me take a look at the pictures?

thank you.
drupal-error.png
drupal-error-02.png