ServerAlias stopped working

Posted on

ServerAlias stopped working – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, ubuntu, virtualhost, serveralias, .

I had this working, then my VM server crashed.

I’m running Ubuntu on Oracle VirtualBox. Now I’m trying to add some server aliases, but it’s not working.

In my ‘sites-enabled’ folder I have a file called This has the following data:

<VirtualHost *:80>
  DocumentRoot /var/www/mysite/

  <Directory />
    Options FollowSymLinks
    AllowOverride All

  <Directory /var/www/storelocator/>
    AllowOverride All
    Allow from all

But I’m still not able to access the site using It only shows me the folders in www root folder.

What am I missing here?

Solution :

Try removing your commas. I’ve always used spaces to delimit the hostnames (same goes for /etc/hosts as well)

Your definitions seem totally correct to me. However this rather sounds like a DNS issue. Depending on your host, try refresh you DNS cache (depending on your OS) and check if matches the IP of your VM.

Can you remove replace the ServerAlias line entry as given below, restart Apache and then try ?


sudo /etc/init.d/apache2 restart

Leave a Reply

Your email address will not be published. Required fields are marked *