I run nginx with docker on my machine (localhost).
When I browse to localhost:8080 I expect to get "hello world", but I get "Welcome to nginx!" screen.
What I have missing in the configuration?
docker-compose.yml
web:
image: nginx
volumes:
- ./example.com.conf:/etc/nginx/conf.d/example.com.conf
ports:
- '8080:80'
example.com.conf
server {
location / {
return 200 "hello world";
}
}
I run the command:
docker-compose up