Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have migrated from Raring to Saucy on my web server, and with it, upgraded Apache from 2.2.x to 2.4.x.

Apache now seems not to be aware of the sites-enabled directory or its content. Every host is served up with the 000-default.conf. An example of a VirtualHost is 006-cjshayward:

<VirtualHost *:80>

    DocumentRoot /home/jonathan/cjshayward/public_html
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    <Directory /var/www/>
        Options ExecCGI Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all

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

    ErrorLog ${APACHE_LOG_DIR}/author.cjshayward.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 None
        Order deny,allow
        Deny from all
        Allow from ::1/128


<VirtualHost *:80>
    RewriteEngine on
    RewriteRule ^(.*)$$1 [R=301,L]

What else do I need to do to register as having a VirtualHost with its own parent directory?

share|improve this question
Is the Include line for sites-enabled still present in apache2.conf? That's what's responsible for loading the contents of those files. – Shane Madden Oct 24 '13 at 17:26
Always post the result of httpd -S (or, for Debuntu systems, apache2ctl -S) when discussing vhost problems. – adaptr Oct 24 '13 at 17:50
up vote 2 down vote accepted

Apache 2.2's apache2.conf had this directive: Include sites-enabled/*

Apache 2.4's apache2.conf has switched to using this directive: IncludeOptional sites-enabled/*.conf

Most likely the files in your sites-enabled directory do not end in .conf

share|improve this answer

As Shane mentions you need to make sure httpd.conf is including files from your sites-enabled folder.

Further, most Debian based distributions will include all files in the sites-enabled folder, while, last I checked the Redhat "equivalent" will only include files with a .conf extension.

Either way, this needs to be present in your httpd.conf:

Include /etc/apache2/sites-enabled/*
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.