Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save anupkrbid/a265f904c717d069de681458ca428dbf to your computer and use it in GitHub Desktop.
Save anupkrbid/a265f904c717d069de681458ca428dbf to your computer and use it in GitHub Desktop.
serving webpages other than html folder for apache2

If your folder is in "/home//Projects/" then run the below command add add the given lines in "/etc/apache2/apache2.conf"

sudo nano /etc/apache2/apache2.conf
<Directory /home/*/Projects/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

If still you get "403 Forbidden You don’t have permission to access / on this server" then you need to use chmod 755 instead of 750 on directories. Using 750 equates to users having read, write, and execute, groups having read and execute, and finally, world (i.e your visitors) having absolutely zero access, thus they will be forbidden from accessing and/or viewing the contents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment