V
V
Vladislav Sofienko2016-09-28 22:37:11
Apache HTTP Server
Vladislav Sofienko, 2016-09-28 22:37:11

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.
944c54538c634dbb885ccfbd78939936.JPG
And I changed the path in 000-default.conf
39569573fea4476a94afe81947430fcd.JPG
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.
e5f5e5acb5964ea4b1676646567784d2.JPG
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

3 answer(s)
D
Dmitry, 2016-09-28
@slo_nik

Good evening.
1) Check directory permissions.
2) Is there an index file?
This is first of all.

V
Vladislav Sofienko, 2016-09-29
@sofvlad

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?

Y
Yuri Chudnovsky, 2016-09-29
@Frankenstine

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 question

Ask a Question

731 491 924 answers to any question