Solved

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

Posted on 2015-01-22
9
146 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 81

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 81

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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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 81

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

752 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