diff options
author | jfederico <jesus@123it.ca> | 2020-02-03 14:31:56 -0500 |
---|---|---|
committer | jfederico <jesus@123it.ca> | 2020-02-03 14:31:56 -0500 |
commit | e47e1c0d820ebace70eefb5f624770d0d9eb99d9 (patch) | |
tree | 098eee209b8e9d1e97d6b6c3b6c0718022070172 /nginx | |
download | scalelite-run-itzks-e47e1c0d820ebace70eefb5f624770d0d9eb99d9.tar.gz scalelite-run-itzks-e47e1c0d820ebace70eefb5f624770d0d9eb99d9.tar.bz2 scalelite-run-itzks-e47e1c0d820ebace70eefb5f624770d0d9eb99d9.zip |
First commit
Diffstat (limited to 'nginx')
-rw-r--r-- | nginx/default/html/index.html | 25 | ||||
-rw-r--r-- | nginx/nginx.conf | 37 | ||||
-rw-r--r-- | nginx/sites.template | 37 |
3 files changed, 99 insertions, 0 deletions
diff --git a/nginx/default/html/index.html b/nginx/default/html/index.html new file mode 100644 index 0000000..2ca3b95 --- /dev/null +++ b/nginx/default/html/index.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html> +<head> +<title>Welcome to nginx!</title> +<style> + body { + width: 35em; + margin: 0 auto; + font-family: Tahoma, Verdana, Arial, sans-serif; + } +</style> +</head> +<body> +<h1>Welcome to nginx!</h1> +<p>If you see this page, the nginx web server is successfully installed and +working. Further configuration is required.</p> + +<p>For online documentation and support please refer to +<a href="http://nginx.org/">nginx.org</a>.<br/> +Commercial support is available at +<a href="http://nginx.com/">nginx.com</a>.</p> + +<p><em>Thank you for using nginx.</em></p> +</body> +</html> diff --git a/nginx/nginx.conf b/nginx/nginx.conf new file mode 100644 index 0000000..981c619 --- /dev/null +++ b/nginx/nginx.conf @@ -0,0 +1,37 @@ +user nginx; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + include /etc/nginx/conf.d/*.conf; + + ## + # Virtual Host Configs + ## + + include /etc/nginx/sites-enabled/*; +} diff --git a/nginx/sites.template b/nginx/sites.template new file mode 100644 index 0000000..4252f81 --- /dev/null +++ b/nginx/sites.template @@ -0,0 +1,37 @@ +#### For <sl.$NGINX_DOMAIN> + +upstream docker-scalelite { + server scalelite:3000; +} + +server { + server_name sl.$NGINX_DOMAIN; + + listen 80; + listen [::]:80; + listen 443 ssl; + listen [::]:443; + + ssl_certificate /etc/letsencrypt/live/sl.$NGINX_DOMAIN/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/sl.$NGINX_DOMAIN/privkey.pem; + + location / { + proxy_pass http://docker-scalelite; + proxy_read_timeout 60s; + proxy_redirect off; + + proxy_set_header Host $http_host; + + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Cookie "$http_cookie; ip=$remote_addr"; + + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + rewrite ~/(.*)$ /$1 break; + } +} |