Skip to content

403 Forbidden error when serving static site #2345

Answered by jhosein
jhosein asked this question in Q&A
Discussion options

You must be logged in to vote

I found a fix. I needed to change the alias path for /app from the volume folder on the host to the path the volume is mapped to inside the NGINX container.

nginx config for tcgsniper.com

From
/root/gotti/volumes/html/tcgsniper-app;
To
/usr/share/nginx/html/tcgsniper-app;

Obviously, Docker Volumes placed the file in the Docker container, I just had to specify its path.

Because I was getting an HTTP 403 error, I gave Chmod 777 permissions to this folder for debugging purposes. Now, I need to figure out what permissions are appropriate.

It looks like NGNIX/Docker needs 755 to read static HTML files.
chmod -R 755 html/

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jhosein
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2344 on December 18, 2023 11:10.