Created
December 12, 2017 04:41
-
-
Save jubeenshah/d6778748fbe3fb3936da1b1542758d42 to your computer and use it in GitHub Desktop.
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
NGINX CONFIGURATION FILE | |
server { | |
listen 80; | |
server_name XXXXXXXXX.com; | |
access_log off; | |
error_log /var/log/nginx/XXXXXXXXX.com.error.log; | |
return 301 https://$host$request_uri; | |
} | |
server { | |
listen 443 ssl http2; | |
ssl on; | |
ssl_certificate /etc/ssl/certs/XXXXXXXXX_com.crt; | |
ssl_certificate_key /etc/ssl/certs/XXXXXXXXX_com.key; | |
server_name XXXXXXXXX.com; | |
resolver 127.0.0.1; | |
ssl_stapling on; | |
ssl_stapling_verify on; | |
ssl_protocols TLSv1.1 TLSv1.2; | |
ssl_ciphers XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
ssl_dhparam /etc/ssl/certs/dhparams.pem; | |
ssl_prefer_server_ciphers on; | |
ssl_trusted_certificate /etc/ssl/certs/XXXXXXXXX_com.crt; | |
access_log /var/log/nginx/XXXXXXXXX_com.access.log time; | |
error_log /var/log/nginx/XXXXXXXXX_com.error.log; | |
#add_header Strict-Transport-Security "max-age=31536000"; | |
root /var/www/production/XXXXXXXXX_com; | |
location ~ ^/api/ { | |
proxy_redirect off; | |
proxy_pass http://127.0.0.1:5999; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-NginX-Proxy true; | |
} | |
error_page 404 /404.html; | |
location = /404.html { | |
root /usr/share/nginx/html; | |
} | |
# redirect server error pages to the static page /50x.html | |
# | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /usr/share/nginx/html; | |
} | |
} | |
ERROR - 09:18:05 - Unknown Service=api | |
ERROR - 09:18:05 - Tue Dec 12 09:18:05 2017 IST - 127.0.0.1 "GET /api/info" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment