Accueil > Logiciel, Système > Virtual host on ubuntu 13.10 and apache 2.4.6

Virtual host on ubuntu 13.10 and apache 2.4.6

18/05/2023 Categories: Logiciel, Système Tags: , ,
Print Friendly, PDF & Email

I have the fallowing problem
My hosts file is as follows:       localhost       barbala4o-HP-ProBook-4530s       mysite.localhost

My file in the /etc/apache2/sites-available/mysite.localhost.conf is as follows :

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName mysite.localhost

        DocumentRoot /var/www/mysite

        <Directory /var/www/mysite/>
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted
        ErrorLog /var/log/apache2/mysite-error.log
        CustomLog /var/log/apache2/mysite-access.log common

After do sudo a2ensite mysite.localhost.conf and restart apache on mysite.localhost/ and only on localhost i get the following(like listing a directory without index file in it) :

Index of /

[ICO]   Name    Last modified   Size    Description
[DIR]   apache_logs/    2013-09-24 10:15     -   
[DIR]   mysql/  2013-10-22 10:05     -   
[DIR]   tools/  2013-10-22 10:05

And on any other folder in the /var/www/ directory like test when i enter localhost/test instead of loading the index.php file it shows:

Not Found

The requested URL /adlantic was not found on this server.

Apache/2.4.6 (Ubuntu) Server at localhost Port 80   

If i do sudo a2dissite mysite.conf and restart apache everything is loading ok. I guess the problem is somewhere in the mysite.localhost.conf but i cant find where. Any ideas? 10x

Lire aussi:  Port Knocking : sécuriser l'accès à un port
Categories: Logiciel, Système Tags: , ,
Les commentaires sont fermés.