I can not access my web application stored in /var/www

Discussion in 'Server Operation' started by Abdussamii Sunusi, Mar 13, 2016.

  1. Abdussamii Sunusi

    Abdussamii Sunusi New Member

    I can not access my web application stored in /var/www. I think I have problem with configuration of user and group on that directory.
    My configuration looks like this:
    drwxr-xr-x 2 www-data www-data 4096 Feb 29 15:54 html
    drw-r--r-- 4 www-data www-data 4096 Mar 8 16:46 www.example.com

    The problem output on my browser is as followed:
    You don't have permission to access / on this server.

    Apache/2.4.10 (Debian) Server at Port 80
  2. vsolmyr

    vsolmyr New Member

    Check at your apache config. if you have enabled the Indexes option (which I do not think is a good practice):
    Options +Indexes
    More over, the www.example.com is directory, so you will need the x permission, for example 755.
  3. imort

    imort New Member

    I think all you need is to have ‘execute’ access to your ‘example.com’ too, and there is a good idea to run ‘chmod 755 example.com -R’ tu ensure that all files inside of directory have same permissions.
    Cyril Cooper likes this.

Share This Page