forked from gergely/calendar-social
Add Vagrant related files
This commit is contained in:
41
ansible/roles/nginx/templates/site-ssl.conf.j2
Normal file
41
ansible/roles/nginx/templates/site-ssl.conf.j2
Normal file
@@ -0,0 +1,41 @@
|
||||
upstream appserver {
|
||||
server localhost:8000 fail_timeout=0;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl deferred;
|
||||
server_name {{ host_name }};
|
||||
|
||||
ssl_certificate {{ home_path }}/{{ project_name }}.crt;
|
||||
ssl_certificate_key {{ home_path }}/{{ project_name }}.key;
|
||||
ssl_session_cache shared:SSL:32m;
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
access_log /var/log/nginx/{{ project_name }}.access.log;
|
||||
error_log /var/log/nginx/{{ project_name }}.error.log info;
|
||||
|
||||
keepalive_timeout 5;
|
||||
|
||||
location /static {
|
||||
alias {{ project_path }}/static;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_read_timeout 180s;
|
||||
|
||||
if (!-f $request_filename) {
|
||||
proxy_pass http://appserver;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
29
ansible/roles/nginx/templates/site.conf.j2
Normal file
29
ansible/roles/nginx/templates/site.conf.j2
Normal file
@@ -0,0 +1,29 @@
|
||||
upstream appserver {
|
||||
server localhost:8000 fail_timeout=0;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name {{ host_name }};
|
||||
|
||||
access_log /var/log/nginx/{{ project_name }}.access.log;
|
||||
error_log /var/log/nginx/{{ project_name }}.error.log info;
|
||||
|
||||
keepalive_timeout 5;
|
||||
|
||||
location /static {
|
||||
alias {{ project_path }}/static;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_read_timeout 180s;
|
||||
|
||||
if (-f $request_filename) {
|
||||
proxy_pass http://appserver;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user