parnaigon
By:
parnaigon

403 Directory access is forbidden

August 4, 2017 134 views
LAMP Stack Apache Ubuntu 16.04

I follow this instruction

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04

now when i go to ip address this error occurs: Directory access is forbidden.

in /var/www/

drwxr-xr-x 3 755 www-data 4096 Aug 4 12:33 .
drwxr-xr-x 14 root root 4096 Aug 4 12:33 ..
drwxr-xr-x 16 755 www-data 4096 Aug 4 13:15 html

what should I do?

3 Answers

Do you have an index file?

Yes I do inside /var/www/html, but not in /var/www

/var/www/html$ ls -la
total 76
drwxr-xr-x 16 755 www-data 4096 Aug 4 13:15 .
drwxr-xr-x 3 755 www-data 4096 Aug 4 12:33 ..
drwxr-xr-x 2 755 www-data 4096 Aug 4 12:55 cache
drwxr-xr-x 2 755 www-data 4096 Aug 4 12:55 config
drwxr-xr-x 2 755 www-data 4096 Aug 4 12:55 controllers
drwxr-xr-x 2 755 www-data 4096 Aug 4 12:55 core
drwxr-xr-x 2 755 www-data 4096 Aug 4 12:55 errors
drwxr-xr-x 4 755 www-data 4096 Aug 4 12:55 helpers
drwxr-xr-x 2 755 www-data 4096 Aug 4 12:55 hooks
-rw-r--r-- 1 755 www-data 123 Aug 4 12:55 index.html
-rw-r--r-- 1 755 www-data 20 Aug 4 13:13 jd.php
drwxr-xr-x 13 755 www-data 4096 Aug 4 12:55 language
drwxr-xr-x 2 755 www-data 4096 Aug 4 12:55 libraries
drwxr-xr-x 2 755 www-data 4096 Aug 4 12:55 logs
drwxr-xr-x 2 755 www-data 4096 Aug 4 12:55 migrations
drwxr-xr-x 2 755 www-data 4096 Aug 4 12:55 models
drwxr-xr-x 3 755 www-data 4096 Aug 4 12:55 third_party
-rw-rw-r-- 1 755 www-data 7 Aug 4 12:55 version.txt
drwxr-xr-x 3 755 www-data 4096 Aug 4 12:55 views

that is the root directory of the website for apache2

Have another answer? Share your knowledge.