Question

Part of the old vhost files looked like this:

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

After upgrading to Ubuntu 13.10 / Apache 2.4, the vhost is ignored until you remove all the <Directory> configuration. Where did this go?

Was it helpful?

Solution 4

As of now (2014-03-25), I retested the same configuration on a fully updated Ubuntu server, and the settings are no longer ignored, as long as the default directory options are specified for the default AKA fallback configuration too. E.g. 000-default.conf.

OTHER TIPS

You can use this configuration to handle multiple vhosts. These lines will go in apache2.conf file.

<VirtualHost *:80>
    ServerName mydomain.com

    DocumentRoot /var/www

    <Directory /var/www>
    Allow from all
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName blog.mydomain.com
    ServerAlias *.mydomain.com
    DocumentRoot /var/www

    <Directory /var/www>
    Allow from all
    </Directory>

</VirtualHost>

I had a similar problem with Linux Mint 16: I wanted the server location to be /home/user/www instead of /var/www, but couldn't see the Directory option to edit.

After some browsing, I found it in /etc/apache2/apache2.conf, around line 160.

Hope this helps you.

You need to put this inside /etc/apache2/apache2.conf file

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top