Skip to content

Instantly share code, notes, and snippets.

@uurtech
Created May 3, 2021 19:12
Show Gist options
  • Save uurtech/a2f50ef5f39b39ae384716f49ff89218 to your computer and use it in GitHub Desktop.
Save uurtech/a2f50ef5f39b39ae384716f49ff89218 to your computer and use it in GitHub Desktop.
nginx-docker-compose
server {
server_name _;
listen 80 default_server;
location / {
add_header Content-Type text/html;
return 200 'hello';
}
location /hello {
proxy_pass http://127.0.0.1/;
}
location /go-to-google {
return 301 https://google.com;
}
}
version: '3'
services:
nginx:
image: nginx:latest
container_name: web_app
volumes:
- ./default.conf:/etc/nginx/conf.d/default.conf
ports:
- 80:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment