Created
August 26, 2017 17:17
-
-
Save dancrumb/f0ec9abe3111ee9b0e4f6255a5134393 to your computer and use it in GitHub Desktop.
Config for ishchenko/idea-nginx#58
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
user nginx; | |
worker_processes auto; | |
error_log /Users/danrumney/projectname/ohp/nginx/logs/error.log; | |
include /usr/share/nginx/modules/*.conf; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
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 /Users/danrumney/projectname/ohp/nginx/logs/access.log main; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 65; | |
types_hash_max_size 2048; | |
include /etc/nginx/mime.types; | |
include /etc/nginx/conf.d/*.conf; | |
default_type application/octet-stream; | |
index index.html index.htm; | |
server { | |
listen 8080 default_server; | |
listen [::]:8080 default_server; | |
server_name servername.danrumney; | |
return 301 https://$server_name$request_uri; | |
} | |
server { | |
listen 8443 ssl http2 default_server; | |
listen [::]:8443 ssl http2 default_server; | |
server_name servername.danrumney; | |
root /Users/danrumney/projectname/ohp/dist; | |
gzip on; | |
gzip_types text/plain text/css text/javascript application/javascript; | |
ssl_certificate "/Users/danrumney/projectname/ohp/nginx/certs/fullchain.pem"; | |
ssl_certificate_key "/Users/danrumney/projectname/ohp/nginx/certs/privkey.pem"; | |
ssl_dhparam "/Users/danrumney/projectname/ohp/nginx/certs/dhparams.pem"; | |
ssl_session_cache shared:SSL:1m; | |
ssl_session_timeout 10m; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers HIGH:SEED:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!RSAPSK:!aDH:!aECDH:!EDH-DSS-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!SRP; | |
ssl_prefer_server_ciphers on; | |
include /etc/nginx/default.d/*.conf; | |
location /api/ { | |
proxy_pass http://localhost:7000/; | |
proxy_ssl_session_reuse off; | |
proxy_set_header Host $host; | |
proxy_redirect off; | |
} | |
location /events/ { | |
proxy_pass http://localhost:7001/; | |
proxy_ssl_session_reuse off; | |
proxy_set_header Host $host; | |
proxy_set_header Connection ""; | |
proxy_http_version 1.1; | |
} | |
location /emails/ { | |
proxy_pass http://localhost:7002/; | |
proxy_ssl_session_reuse off; | |
proxy_set_header Host $host; | |
proxy_redirect off; | |
} | |
location / { | |
proxy_pass https://localhost:9000/; | |
proxy_ssl_session_reuse off; | |
proxy_set_header Host $host; | |
proxy_redirect off; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment