Created
May 3, 2021 19:12
-
-
Save uurtech/a2f50ef5f39b39ae384716f49ff89218 to your computer and use it in GitHub Desktop.
nginx-docker-compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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