Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index of "/etc/nginx/html/" is forbidden 403 forbiddan error how to resolve #354

Closed
asd99557 opened this issue Dec 14, 2020 · 14 comments
Closed

Comments

@asd99557
Copy link

Description

Steps To Reproduce
1.

Expected Result

Actual Result

@Stefan386
Copy link

I had the same problem. Probably you have to edit your docker-compose.dev.yml to fix it. This is my yml:
docker-compose.dev.zip

@asd99557
Copy link
Author

asd99557 commented Dec 14, 2020 via email

@asd99557
Copy link
Author

asd99557 commented Dec 14, 2020

if you can let me know what kind of changes are required in docker-compose-dev.yml file If you can provide me guide it is so helpful for something is urgent please help me

@Stefan386
Copy link

Just make a diff of both files. As far is I know, you only need to remove line 11 - 25, and remove # on line 26.

@asd99557
Copy link
Author

Little confusion here please clear that
Remove line 11-25 ?
remove only # from 11-25 and 26 ?

@martinslaganovskis
Copy link

martinslaganovskis commented Dec 14, 2020

The problem for me was that the Magento installation was not complete. Installed using composer but something must have failed since src directory did not contain all of Magento files. Once I installed correctly this particular error was gone. So for me it was to make sure that all host Magento files like app/ bin/ are there. Afterwards ran the bin/setup once again and everything was fine.

@markshust
Copy link
Owner

Closing out as I cannot replicate this issue. Perhaps your nginx.conf.sample or nginx.conf file in the Magento root is missing.

@Magesh-B
Copy link

I faced the same issue, For me, my nginx.conf was empty, I had to copy the nginx.conf.sample contents to the actual file for it to work.

@markshust
Copy link
Owner

That shouldn't be needed, so long as the nginx.conf.sample file hasn't been deleted, since it's mounted at https://github.com/markshust/docker-magento/blob/master/compose/docker-compose.dev.yml#L12

Many delete this file though, which could definitely cause this issue.

@msalmenius
Copy link

The problem for me was that the Magento installation was not complete. Installed using composer but something must have failed since src directory did not contain all of Magento files. Once I installed correctly this particular error was gone. So for me it was to make sure that all host Magento files like app/ bin/ are there. Afterwards ran the bin/setup once again and everything was fine.

Yes indeed, needed running bin/setup for me as well.

@ESCA7A
Copy link

ESCA7A commented Aug 23, 2022

@markshust hi!
can you advise? How to use this repo for my project (not magento 2) ? What settings to change to make the server work?

[error] 29#29: *1 directory index of "/etc/nginx/html/" is forbidden, client: 172.23.0.1, server: , request: "GET / HTTP/2.0", host: "172.17.0.1"

@markshust
Copy link
Owner

@ESCA7A the default web server path changed many years ago to /var/www/html. As this is a very old ticket, please create a new issue if you are having any issues.

@ESCA7A
Copy link

ESCA7A commented Aug 31, 2022

@ESCA7A the default web server path changed many years ago to /var/www/html. As this is a very old ticket, please create a new issue if you are having any issues.

okay, thanks a lot :)

@elvishuges
Copy link

@ESCA7A How did you fix that error? which file a need to change and how to do that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants