Orrett
By:
Orrett

All my Virtual Hosts are working except this one

August 27, 2014 1.6k views

Hey guys. I have the following setup
Ubuntu 12.04 LTS
LAMP Stack
4 Virtual Hosts

Currently all my virtual hosts are working except for one. It was working when I last checked it a couple days ago but since then it has stopped working. The DNS is working so I know it is some misconfiguration on my server. I have disabled and re-enabled the virtual host as well as creating a completely new virtual host with the same directory location. Nothing seems to work. I am posting my virtual host file and hopefully someone can show me what is going on.

<VirtualHost *:80>
    ServerAdmin *******@gmail.com
    ServerName ************.com
    ServerAlias www.************.com

    DocumentRoot /var/www/************
    <Directory />
        Options FollowSymLinks
        AllowOverride All
    </Directory>
    <Directory /var/www/************/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride All
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride All
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

Thanks in advance for any help.

2 comments
  • What do you mean by it's not "working"? Are you able to ping the domain? Do you get any errors when you restart apache? Is there anything in your apache error_log?

  • What is the error?
    Not open? or open other page that you have on server?
    If open other page, the problema ir the order of your vhots, and you have vhosts with the same ServerName or ServerAlias. Can you check this?

    And make the tests that our friend tell.
    Can you ping hostname?

    Regards

1 Answer

Sorry to see that your question hasn't received an answer yet. Unfortunately, after this much time, it is unlikely that an answer for this specific question will be provided. For people still landing here via search, check out this updated tutorial on setting up Apache Virtual Hosts:

The Apache web server is the most popular way to serve web content on the internet. Apache has the ability to serve multiple domains from a single server by using a mechanism called "virtual hosts". If a virtual host is configured correctly for each domain, the web server can correctly route traffic to the appropriate files based on the domain name requested. In this guide, we'll demonstrate how to configure Apache virtual hosts on an Ubuntu 16.04 server.
Have another answer? Share your knowledge.