Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upstream puma_server {
- server unix:/home/deploy/docs-central/tmp/puma.sock fail_timeout=0;
- }
- server {
- if ($host = www.docs.swagger.example.com) {
- return 301 https://$server_name$request_uri;
- }
- if ($host = docs.swagger.example.com) {
- return 301 https://$server_name$request_uri;
- }
- server_name docs.swagger.example.com www.docs.swagger.example.com;
- }
- server {
- listen 443 ssl http2;
- server_name docs.swagger.example.com www.docs.swagger.example.com;
- # SSL
- ssl_trusted_certificate /etc/letsencrypt/live/docs.swagger.example.com/chain.pem;
- ssl_certificate /etc/letsencrypt/live/docs.swagger.example.com/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/docs.swagger.example.com/privkey.pem;
- include snippets/ssl-config.conf;
- location / {
- proxy_pass http://puma_server;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $http_host;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment