Last active
August 16, 2017 11:38
-
-
Save seyyah/65dcfc88ef0331410c9d5d973f0dbd7c to your computer and use it in GitHub Desktop.
HospitalRun Server - DigitalOcean - Docker - Nginx
This file contains hidden or 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
| worker_processes 1; | |
| events { worker_connections 1024; } | |
| http { | |
| upstream website { | |
| server 172.18.0.6:8055; | |
| } | |
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server ipv6only=on; | |
| #server_name 185.14.187.134 app.bulut.dental; | |
| server_name app.bulut.dental; | |
| gzip_types text/plain text/css application/json application/x-javascript | |
| text/xml application/xml application/xml+rss text/javascript; | |
| location / { | |
| proxy_pass http://website; | |
| #include /etc/nginx/proxy_params; | |
| #include /etc/nginx/mime.types; | |
| } | |
| } | |
| } |
This file contains hidden or 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
| # Guide: https://www.digitalocean.com/community/tutorials/docker-explained-how-to-containerize-and-use-nginx-as-a-proxy | |
| worker_processes 1; | |
| events { worker_connections 1024; } | |
| http { | |
| sendfile on; | |
| gzip on; | |
| gzip_http_version 1.0; | |
| gzip_proxied any; | |
| gzip_min_length 500; | |
| gzip_disable "MSIE [1-6]\."; | |
| gzip_types text/plain text/xml text/css | |
| text/comma-separated-values | |
| text/javascript | |
| application/x-javascript | |
| application/atom+xml; | |
| # List of application servers | |
| upstream app_servers { | |
| server 127.0.0.1:8080; | |
| } | |
| # Configuration for the server | |
| server { | |
| # Running port | |
| listen 80; | |
| # Proxying the connections connections | |
| location / { | |
| proxy_pass http://app_servers; | |
| proxy_redirect off; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Host $server_name; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment