Commit 02c3927e2c7f4e48bcf27d160cf06f37e835f856
1 parent
d01734fcf8
Exists in
master
Add php support for h5ai
Showing 1 changed file with 8 additions and 0 deletions Inline Diff
nginxconf/flashy.cards
View file @
02c3927
upstream backend_production { | 1 | 1 | upstream backend_production { | |
# server unix:/tmp/flashy.sock; | 2 | 2 | # server unix:/tmp/flashy.sock; | |
server localhost:7002; | 3 | 3 | server localhost:7002; | |
} | 4 | 4 | } | |
5 | 5 | |||
server { | 6 | 6 | server { | |
7 | 7 | |||
server_name flashy.cards; | 8 | 8 | server_name flashy.cards; | |
listen 443 ssl; | 9 | 9 | listen 443 ssl; | |
10 | location ~ \.php$ { | |||
11 | try_files $uri =404; | |||
12 | fastcgi_pass unix:/var/run/php5-fpm.sock; | |||
13 | fastcgi_index index.php; | |||
14 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |||
15 | include fastcgi_params; | |||
16 | } | |||
17 | ||||
location / { | 10 | 18 | location / { | |
root /srv/flashy.cards/; | 11 | 19 | root /srv/flashy.cards/; | |
} | 12 | 20 | } | |
13 | 21 | |||
location ^~ /static { | 14 | 22 | location ^~ /static { | |
root /srv/; | 15 | 23 | root /srv/; | |
access_log off; | 16 | 24 | access_log off; | |
expires 30d; | 17 | 25 | expires 30d; | |
} | 18 | 26 | } | |
19 | 27 | |||
location ^~ /app/ { | 20 | 28 | location ^~ /app/ { | |
alias /srv/flashy-frontend/; | 21 | 29 | alias /srv/flashy-frontend/; | |
try_files $uri /app/home.html; | 22 | 30 | try_files $uri /app/home.html; | |
} | 23 | 31 | } | |
24 | 32 | |||
location ~ /(api|admin|api-auth)/ { | 25 | 33 | location ~ /(api|admin|api-auth)/ { | |
add_header 'Access-Control-Allow-Origin' 'http://localhost'; | 26 | 34 | add_header 'Access-Control-Allow-Origin' 'http://localhost'; | |
add_header 'Access-Control-Allow-Credentials' 'true'; | 27 | 35 | add_header 'Access-Control-Allow-Credentials' 'true'; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PATCH, PUT'; | 28 | 36 | add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PATCH, PUT'; | |
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,Origin,Authorization,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-CSRFToken'; | 29 | 37 | add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,Origin,Authorization,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-CSRFToken'; | |
proxy_pass http://backend_production; | 30 | 38 | proxy_pass http://backend_production; | |
proxy_redirect http://backend_production $scheme://flashy.cards; | 31 | 39 | proxy_redirect http://backend_production $scheme://flashy.cards; | |
proxy_set_header Host $host; | 32 | 40 | proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | 33 | 41 | proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 34 | 42 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | 35 | 43 | proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header REMOTE_ADDR $remote_addr; | 36 | 44 | proxy_set_header REMOTE_ADDR $remote_addr; | |
} | 37 | 45 | } | |
38 | 46 | |||
location ^~ /jenkins { | 39 | 47 | location ^~ /jenkins { | |
proxy_pass http://localhost:8080; | 40 | 48 | proxy_pass http://localhost:8080; | |
proxy_redirect http://localhost:8080 $scheme://flashy.cards; | 41 | 49 | proxy_redirect http://localhost:8080 $scheme://flashy.cards; | |
proxy_set_header Host $host; | 42 | 50 | proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | 43 | 51 | proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 44 | 52 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | 45 | 53 | proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_read_timeout 90; | 46 | 54 | proxy_read_timeout 90; | |
} | 47 | 55 | } | |
ssl_certificate /etc/nginx/ssl/bundle.crt; | 48 | 56 | ssl_certificate /etc/nginx/ssl/bundle.crt; | |
ssl_certificate_key /etc/nginx/ssl/nginx.key; | 49 | 57 | ssl_certificate_key /etc/nginx/ssl/nginx.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | 50 | 58 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS; | 51 | 59 | ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS; | |
ssl_prefer_server_ciphers on; | 52 | 60 | ssl_prefer_server_ciphers on; | |
keepalive_timeout 70; | 53 | 61 | keepalive_timeout 70; | |
ssl_session_cache shared:SSL:10m; | 54 | 62 | ssl_session_cache shared:SSL:10m; | |
ssl_session_timeout 10m; | 55 | 63 | ssl_session_timeout 10m; | |
add_header Strict-Transport-Security "max-age=259200"; | 56 | 64 | add_header Strict-Transport-Security "max-age=259200"; |