Solved

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

Posted on 2015-01-22
9
132 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 78

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 78

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
 

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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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 78

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now