Solved

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

Posted on 2015-01-22
9
138 Views
Last Modified: 2015-03-04
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
0
Comment
Question by:Jason Yu
  • 6
  • 3
9 Comments
 
LVL 79

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 500 total points
ID: 40565441
<VirtualHost *:80>
  DocumentRoot /var/devlegl/www/html
  ServerName devleg.testdomain.org
  ServerAlias devleg
  ErrorLog /var/www/logs/legacy_error.log
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot /var/devcal/www/html
  ServerName devcal.testdomain.org
  ServerAlias devcal
  ErrorLog /var/www/logs/legacy_error.log
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot /var/devcov/www/html
  ServerName devcov.testdomain.org
  ServerAlias devcov
  ErrorLog /var/www/logs/legacy_error.log
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot /var/devw/www/html
  ServerName devw.testdomain.org
  ServerAlias devw
  ErrorLog /var/www/logs/legacy_error.log
</VirtualHost>
<VirtualHost *:80>
  DocumentRoot /var/dorrington/www/html
  ServerName dorrington.testdomain.org
#  ServerAlias www.legacy.testdomain.org
  ServerAlias dorrington
  ErrorLog /var/www/logs/legacy_error.log
</VirtualHost>
0
 

Author Comment

by:Jason Yu
ID: 40565492
how to restart apache and drupal service?

thanks.
0
 
LVL 79

Expert Comment

by:David Johnson, CD, MVP
ID: 40565724
Drupal isn't a service
apache can be a service..
linux
sudo service apache2 restart
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:Jason Yu
ID: 40567496
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]#
0
 

Author Comment

by:Jason Yu
ID: 40567559
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>
0
 

Author Comment

by:Jason Yu
ID: 40567562
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.
0
 
LVL 79

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 40567930
go into your drupal admin center and configure drupal there. The previous advise was if you had separate websites but you don't as you have 1 drupal installation with subsites
0
 

Author Comment

by:Jason Yu
ID: 40568286
How can I find the frugal admin center?

Thanks.
0
 

Author Comment

by:Jason Yu
ID: 40578736
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
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question