Virtual host on ubuntu 13.10 and apache 2.4.6

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

    Execute:
    vim can be change with your favourite text editor like nano, pico and etc.

    vim /etc/apache2/apache2.conf

    Original file:

    # Sets the default security model of the Apache2 HTTPD server. It does
    # not allow access to the root filesystem outside of /usr/share and /var/www.
    # The former is used by web applications packaged in Debian,
    # the latter may be used for local directories served by the web server. If
    # your system is serving content from a sub-directory in /srv you must allow
    # access here, or in any related virtual host.
    
            Options FollowSymLinks
            AllowOverride None
            Require all denied
    
    
    
            AllowOverride None
            Require all granted
    
    
    
            Options Indexes FollowSymLinks
            AllowOverride None
            Require all granted
    
    

    Change None to All

    Edit file:

    # Sets the default security model of the Apache2 HTTPD server. It does
    # not allow access to the root filesystem outside of /usr/share and /var/www.
    # The former is used by web applications packaged in Debian,
    # the latter may be used for local directories served by the web server. If
    # your system is serving content from a sub-directory in /srv you must allow
    # access here, or in any related virtual host.
    
            Options FollowSymLinks
            AllowOverride All
            Require all denied
    
    
    
            AllowOverride All
            Require all granted
    
    
    
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
    
    

提交回复
热议问题