Virtual host on ubuntu 13.10 and apache 2.4.6

前端 未结 8 1555
迷失自我
迷失自我 2021-01-30 07:09

I have the following problem
My hosts file is as follows:

127.0.0.1       localhost
127.0.1.1       barbala4o-HP-ProBook-4530s
127.0.1.1       mysite.local         


        
8条回答
  •  执念已碎
    2021-01-30 07:43

    I found the problem after 3h of experimenting. Apparently in the new Ubuntu 13.10 for some stupid reason the conf file for the virtual host has to look similar to this:

    
            ServerAdmin webmaster@example.com
            ServerName  mysite.localhost
            ServerAlias mysite.localhost
    
            # Indexes + Directory Root.
            DocumentRoot /var/www/mysite/public_html
    
             
                    DirectoryIndex index.php
                    Options Indexes FollowSymLinks
                    AllowOverride All
                    Require all granted
            
    
            # Logfiles
            ErrorLog /var/log/apache2/mysite-error.log
            CustomLog /var/log/apache2/mysite-access.log common
    
    

    Apparently the guys that developed Ubuntu 13.10 decided that it is no longer valuable to use

     
    

    when making a virtual host and instead it has to be

    
    

    mixed with specifically specifying DirectoryIndex. This fixed the problem i had and now things are working(hopefully as they should, something may come up eventually) Apparently the configuration file of apache is different.

提交回复
热议问题