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

Nginx server runs OK but I can't map my local index.html file to nginx #1

Closed
rabit1 opened this issue Aug 28, 2016 · 2 comments
Closed

Comments

@rabit1
Copy link

rabit1 commented Aug 28, 2016

Hi,

I have a 32bit ubuntu 14.04 server (192.168.1.201) and successfully pull and run this docker image. I can access the nginx welcome page from other computer. However, having mapped the local directory /var/www using this docker command:

docker run -d --name nginx -p 8080:80 -v /var/www/:/usr/share/nginx/html:ro f69m/ubuntu32-nginx

nginx can't seem to serve my /var/www/index.html page. Trying to access this index.html from other computer gives me a 404 error message. How do I troubleshoot this?

http://192.168.1.201:8080 -> works (nginx welcome page)
http://192.168.1.201:8080/index.html -> 404 Error. (Instead of my index.html page)

Sorry for this newbie question. Appreciate any help. Thank you,
Regards,

@f69m
Copy link
Owner

f69m commented Dec 27, 2016

Sorry for the late response, seems I missed the notification.
The web root directory should be /var/www/html. Does it work, if you move your index file to /var/www/html/index.html?
If it won't work that way, I need to dig in deeper.

@rabit1
Copy link
Author

rabit1 commented Jan 7, 2017

That works. Thank you.

@rabit1 rabit1 closed this as completed Jan 7, 2017
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

2 participants