Solved

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

Posted on 2015-01-22
9
136 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

Superior storage. Superior surveillance.

WD Purple drives are built for 24/7, always-on, high-definition security systems. With support for up to 8 hard drives and 32 cameras, WD Purple drives are optimized for surveillance.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Configure IIS to process JSON 10 74
ip / url redirect 13 68
Setting up a WAMP server... 7 55
Recommendations for Web-Based Multi-User File Manager / FTP software? 4 58
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
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.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 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

15 Experts available now in Live!

Get 1:1 Help Now