diff options
author | Paweł Dybiec <pawel.to.malpa@gmail.com> | 2019-04-17 19:32:05 +0200 |
---|---|---|
committer | Paweł Dybiec <pawel.to.malpa@gmail.com> | 2019-04-17 19:32:05 +0200 |
commit | d2bddf17abafb85fcd6bccc078ccca46d7a72478 (patch) | |
tree | f247fed8833f9b5a4edf4d7c1613b550a3dbafb1 /compose | |
parent | Change docker compose dir (diff) |
Move generate nginx file per domain
Diffstat (limited to 'compose')
-rw-r--r-- | compose/nginx/conf.d/dybiec.info.conf | 168 | ||||
-rw-r--r-- | compose/nginx/nginx.conf | 2 |
2 files changed, 2 insertions, 168 deletions
diff --git a/compose/nginx/conf.d/dybiec.info.conf b/compose/nginx/conf.d/dybiec.info.conf deleted file mode 100644 index 90cd471..0000000 --- a/compose/nginx/conf.d/dybiec.info.conf +++ /dev/null @@ -1,168 +0,0 @@ -server { - listen 80; - listen 443 ssl; - server_name .dybiec.info; - - ssl_certificate /etc/letsencrypt/live/dybiec.info/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/dybiec.info/privkey.pem; - - location / { - root /usr/share/nginx/html; - index index.html; - } - -} -server { - listen 80; - listen 443 ssl; - server_name cnt.dybiec.info; - - ssl_certificate /etc/letsencrypt/live/dybiec.info/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/dybiec.info/privkey.pem; - - location / { - proxy_pass http://localhost:5004; - } -} -server { - listen 80; - listen 443 ssl; - server_name registry.dybiec.info; - - ssl_certificate /etc/letsencrypt/live/dybiec.info/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/dybiec.info/privkey.pem; - - location / { - proxy_pass http://localhost:5000; - proxy_set_header Host $http_host; # required for docker client's sake - proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - client_max_body_size 0; - } -} -server { - listen 80; - server_name git.dybiec.info; - return 301 https://$server_name$request_uri; -} -server { - listen 443 ssl; - server_name git.dybiec.info; - - ssl_certificate /etc/letsencrypt/live/dybiec.info/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/dybiec.info/privkey.pem; - - location / { - proxy_pass http://localhost:5001; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_redirect off; - proxy_http_version 1.1; - } - gzip_proxied any; - gzip_types - text/css - text/javascript - text/xml - text/plain - application/javascript - application/x-javascript - application/json; - -} -server { - listen 80; - server_name grafana.dybiec.info; - return 301 https://$server_name$request_uri; -} -server { - listen 443 ssl; - server_name grafana.dybiec.info; - - ssl_certificate /etc/letsencrypt/live/dybiec.info/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/dybiec.info/privkey.pem; - - location / { - proxy_pass http://localhost:5002; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_redirect off; - proxy_http_version 1.1; - } - gzip_proxied any; - gzip_types - text/css - text/javascript - text/xml - text/plain - application/javascript - application/x-javascript - application/json; - -} -server { - listen 80; - server_name prometheus.dybiec.info; - return 301 https://$server_name$request_uri; -} -server { - listen 443 ssl; - server_name prometheus.dybiec.info; - - ssl_certificate /etc/letsencrypt/live/dybiec.info/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/dybiec.info/privkey.pem; - - location / { - proxy_pass http://localhost:5003; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_redirect off; - proxy_http_version 1.1; - } - gzip_proxied any; - gzip_types - text/css - text/javascript - text/xml - text/plain - application/javascript - application/x-javascript - application/json; - -} -server { - listen 80; - server_name octoprint.dybiec.info; - return 301 https://$server_name$request_uri; -} -server { - listen 443 ssl; - server_name octoprint.dybiec.info; - - ssl_certificate /etc/letsencrypt/live/dybiec.info/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/dybiec.info/privkey.pem; - - location / { - proxy_pass http://192.168.255.6/; - proxy_redirect off; - proxy_http_version 1.1; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - - client_max_body_size 0; - } - gzip_proxied any; - gzip_types - text/css - text/javascript - text/xml - text/plain - application/javascript - application/x-javascript - application/json; - -} diff --git a/compose/nginx/nginx.conf b/compose/nginx/nginx.conf index aa6cbd7..fc640c2 100644 --- a/compose/nginx/nginx.conf +++ b/compose/nginx/nginx.conf @@ -19,6 +19,8 @@ http { '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; + ssl_certificate /etc/letsencrypt/live/dybiec.info/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/dybiec.info/privkey.pem; sendfile on; tcp_nopush on; |