Virtual host on ubuntu 13.10 and apache 2.4.6

前端 未结 8 1459
迷失自我
迷失自我 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:44

    I had a same issue ,but None of these above postings worked for me . Later I read and reviewed each and every configuration files of Apache and PHP .

    I could figure out that in apache2.conf( in ubuntu 13.10 ) there is a flag called

    HostnameLookups off
    

    By Default this will be set to off, I changed this to

    HostnameLookups on
    

    By doing so Apache started piking up my host entries and vhost config well .

    Also Below is my actual Vhost file . which I used to make it working

    Offcourse I too recommend adding Require all granted with in the Vhost directive .

    
        ServerName test.yoursite.domain.in
        DocumentRoot path_to_code_base/public
        
            Options -Indexes
            Require all granted
            DirectoryIndex index.php
            AllowOverride All
        
        ErrorLog  /path_to_code_base/logs/error.log
        LogLevel warn
        CustomLog /path_to_code_base/logs/access.log  combined
     
    

    I am posting this to help others who does not want to waste there time in downgrading Ubuntu to 13.04 from 13.10 .

    I do-not see this any blogs , I also could not understand what actually the meaning of hostnameLookups is .

    Hope this helps .

提交回复
热议问题