Commit 1f597c4c by Ben Patterson

Nginx configuration.

parent d92ed523
......@@ -9,41 +9,23 @@
{% set default_site = "" %}
{% endif %}
# map $http_origin $cors_header {
# default "";
# '~*^({{ CREDENTIALS_CORS_WHITELIST|join('|')|replace('.', '\.') }})$' "$http_origin";
# }
server {
# server_name {{ neo4j_server_name }};
server_name localhost;
{% if NGINX_ENABLE_SSL %}
listen {{ CREDENTIALS_NGINX_PORT }} {{ default_site }};
listen {{ CREDENTIALS_SSL_NGINX_PORT }} ssl;
listen 443 ssl;
ssl_certificate /etc/ssl/certs/{{ NGINX_SSL_CERTIFICATE|basename }};
ssl_certificate_key /etc/ssl/private/{{ NGINX_SSL_KEY|basename }};
# request the browser to use SSL for all connections
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
{% else %}
# listen {{ neo4j_port }} {{ default_site }};
listen 7474 {{ default_site }};
# listen {{ neo4j_http_port }} {{ default_site }};
listen 80 {{ default_site }};
{% endif %}
# location ~ ^{{ CREDENTIALS_MEDIA_URL }}(?P<file>.*) {
# root {{ CREDENTIALS_MEDIA_ROOT }};
# try_files /$file =404;
# }
# location ~ ^{{ CREDENTIALS_STATIC_URL }}(?P<file>.*) {
# root {{ CREDENTIALS_STATIC_ROOT }};
# add_header Access-Control-Allow-Origin $cors_header always;
# add_header Cache-Control "max-age=31536000";
# try_files /$file =404;
# }
location / {
try_files $uri @proxy_to_app;
......@@ -56,7 +38,7 @@ server {
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://127.0.0.1:7474;
proxy_pass http://127.0.0.1:7473;
}
# Forward to HTTPS if we're an HTTP request...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment