R
R
RabIN2018-08-29 15:08:24
linux
RabIN, 2018-08-29 15:08:24

Why does "You don't have permission to access / on this server" appear?

Good afternoon. OS Ubuntu 16.04
Installed

> sudo apt-get install apache2
> sudo systemctl enable apache2
> sudo systemctl start apache2

Next, my file is in /etc/apache2/sites-available/it.loc.conf
<
VirtualHost *:80>
ServerName it.loc
ServerAlias www.it.loc
ServerAdmin [email protected]
DocumentRoot /media/my_folder/3ABBCCD87BB08752/www/it.loc
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /media/my_folder/3ABBCCD87BB08752/www/it.loc>
        Options Indexes FollowSymLinks
        AllowOverride All
  Require all granted
</Directory>
</VirtualHost>

Spent the team
sudo a2ensite it.loc.conf
 sudo systemctl restart apache2
sudo vi /etc/hosts
         127.0.0.1 it.loc
sudo systemctl restart apache2

and this error occurs. Apache is on my computer, and the site folder is on an external railway.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis, 2018-08-29
@RabIN

yes, add the apache user (www-data?) to the my_folder group and you will be happy

S
s4kro, 2018-08-29
@s4kro

sudo chmod 777 -R /media/my_folder/3ABBCCD87BB08752/www/
maybe there just isn't enough rights to this directory.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question