Answer the question
In order to leave comments, you need to log in
Apache2 site directory change. 403 error. How to get access?
Hello. I created a virtual machine with Ubuntu Server and installed Apache2.
From the main machine, I rummaged through the folder with the site to the virtual machine and gave access to myself. sudo adduser user_name vboxsf
Then I went into the apache configuration (apache2.conf) and set the settings for the searched folder.
And I changed the path in 000-default.conf
After that, I forwarded the port from the virtual machine to the physical one. I'm trying to access the site, but I see an error.
What have I done wrong? Help me please.
I realized that the apache2(www-data) group does not have access to the folder (/media/sf_RNP), but neither chmod -R 777 /media/sf_RNP nor sudo chown -R www-data: /media/sf_RNP helps
Answer the question
In order to leave comments, you need to log in
Good evening.
1) Check directory permissions.
2) Is there an index file?
This is first of all.
If there was access to a folder without an index file, then the site would give a list of files that are in this directory, but it gives a 403 error. This is probably not enough, since I just added permissions to this folder to my user in Ubuntu. So how to give rights and to whom?
The user under which apache is running (usually www-data) does not have access to /media/sf_RNP
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question