Solved

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

Posted on 2015-01-22
9
152 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
9 Comments
 
LVL 82

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 82

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
 Watch the Recording: Learning MySQL 5.7

MySQL 5.7 has a lot of new features. If you've dabbled with an older version of MySQL, it is definitely worth learning.

 

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 82

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

RTL (right to left) web applications aiming for audiences speaking languages like Hebrew or Arabic, are generally more complicated than the same applications aiming for audiences speaking Latin based languages. The main difference lies of course …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

636 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