Created
April 23, 2019 09:11
-
-
Save john45/03988ae065b9146f2363ee05dd78fced to your computer and use it in GitHub Desktop.
nginx rule for everlabs bot
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
upstream everbot-puma { | |
server unix:///home/deployer/apps/everbot/tmp/sockets/puma.sock fail_timeout=0; | |
} | |
server { | |
server_name bot.everlabs.com; | |
root /home/deployer/apps/everbot; | |
try_files $uri/index.html $uri @everbot-puma; | |
client_max_body_size 50M; | |
keepalive_timeout 10; | |
location @everbot-puma { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $host; | |
proxy_redirect off; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "Upgrade"; | |
>>>>> proxy_set_header X-Forwarded-Host $host; >>>>>>>>>>>>>>>>>>>> add manualy for ability change some through sidekiq web admin | |
>>>>> proxy_set_header X-Forwarded-Proto $scheme; >>>>>>>>>>>>>>>>> add manualy for ability change some through sidekiq web admin | |
proxy_pass http://everbot-puma; | |
# limit_req zone=one; | |
access_log /home/deployer/apps/everbot/log/nginx.access.log; | |
error_log /home/deployer/apps/everbot/log/nginx.error.log; | |
} | |
listen 443 ssl; # managed by Certbot | |
ssl_certificate /etc/letsencrypt/live/bot.everlabs.com/fullchain.pem; # managed by Certbot | |
ssl_certificate_key /etc/letsencrypt/live/bot.everlabs.com/privkey.pem; # managed by Certbot | |
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | |
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot | |
} | |
server { | |
if ($host = bot.everlabs.com) { | |
return 301 https://$host$request_uri; | |
} # managed by Certbot | |
listen 80; | |
server_name bot.everlabs.com; | |
return 404; # managed by Certbot | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment