Commit 1f597c4c by Ben Patterson

Nginx configuration.

parent d92ed523
...@@ -9,41 +9,23 @@ ...@@ -9,41 +9,23 @@
{% set default_site = "" %} {% set default_site = "" %}
{% endif %} {% endif %}
# map $http_origin $cors_header {
# default "";
# '~*^({{ CREDENTIALS_CORS_WHITELIST|join('|')|replace('.', '\.') }})$' "$http_origin";
# }
server { server {
# server_name {{ neo4j_server_name }}; # server_name {{ neo4j_server_name }};
server_name localhost; server_name localhost;
{% if NGINX_ENABLE_SSL %} {% if NGINX_ENABLE_SSL %}
listen {{ CREDENTIALS_NGINX_PORT }} {{ default_site }}; listen 443 ssl;
listen {{ CREDENTIALS_SSL_NGINX_PORT }} ssl;
ssl_certificate /etc/ssl/certs/{{ NGINX_SSL_CERTIFICATE|basename }}; ssl_certificate /etc/ssl/certs/{{ NGINX_SSL_CERTIFICATE|basename }};
ssl_certificate_key /etc/ssl/private/{{ NGINX_SSL_KEY|basename }}; ssl_certificate_key /etc/ssl/private/{{ NGINX_SSL_KEY|basename }};
# request the browser to use SSL for all connections # request the browser to use SSL for all connections
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
{% else %} {% else %}
# listen {{ neo4j_port }} {{ default_site }}; # listen {{ neo4j_http_port }} {{ default_site }};
listen 7474 {{ default_site }}; listen 80 {{ default_site }};
{% endif %} {% 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 / { location / {
try_files $uri @proxy_to_app; try_files $uri @proxy_to_app;
...@@ -56,7 +38,7 @@ server { ...@@ -56,7 +38,7 @@ server {
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_redirect off; 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... # 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