Ok so i have installed apache2 2.4 and i am having problems with porting my old wesites/configs across from old server (apache 2.2) to new one.

By default apache 2.4 default web dir is /var/www/html but this can/should be overriden via /etc/apache2/sites-enabled/000-default.conf file.

my 000-default.conf files:

<VirtualHost extern1:80>
        HostnameLookups Off
        DocumentRoot /var/www/
        ErrorLog /var/log/apache2/error_log
        TransferLog /var/log/apache2/access_log

        <Directory "/var/www/">
                allow from all
                AllowOverride all
                Options +Indexes


inside my www folder there is

- html folder
- index.php (with phpinfo());

However after setting this up, after apache reload, when i access my ip it still opens the default 'debian' webpage and NOT the index.php file as per 000-default.config

Does any one know what else needs to be done ?

  • 1
    Try running apachectl -S to dump the running config. Is the virtual host that is actually used coming from the config file you expect? – Zoredache May 25 '16 at 17:41
  • @Zoredache handy command - it turned out that 'extern1' was not recognized so this config was not actually working - changed to *:80 and it works :) – Maciej Cygan May 25 '16 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.