-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx-example.conf
80 lines (72 loc) · 2.7 KB
/
nginx-example.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
server {
listen 80;
listen [::]:80;
server_name viz.world www.viz.world;
return 301 https://$host$request_uri;
}
server {
server_name viz.world www.viz.world;
root /var/www/viz/viz.world;
index index.html index.php;
access_log /var/www/logs/nginx_access_viz.world.log;
error_log /var/www/logs/nginx_error_viz.world.log;
listen 443 ssl http2;
ssl_certificate /etc/letsencrypt/live/viz.world/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/viz.world/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4;
add_header X-Frame-Options "DENY";
add_header Content-Security-Policy "default-src 'self' *.viz.world; child-src 'self' *.viz.world; script-src 'self' 'unsafe-eval' 'unsafe-inline' *.viz.world https://cdnjs.cloudflare.com/; style-src 'self' 'unsafe-inline' *.viz.world https://fonts.googleapis.com/ https://use.fontawesome.com/ https://maxcdn.bootstrapcdn.com/; img-src * data: *.viz.world i.goldvoice.club; font-src data: *.viz.world https://fonts.googleapis.com/ https://fonts.gstatic.com/ https://use.fontawesome.com/ https://maxcdn.bootstrapcdn.com/; connect-src 'self' wss://testnet.viz.world/ https://testnet.viz.world/ *.viz.world; object-src 'self'; plugin-types application/pdf; frame-ancestors 'self';";
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/(.*)$ /index.php?$1;
}
rewrite ^/$ /index.php;
location ~ \.(php)$ {
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 60;
fastcgi_read_timeout 60;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
include fastcgi_params;
client_max_body_size 10m;
client_body_buffer_size 128k;
expires off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
}
location / {
proxy_redirect off;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 1024k;
proxy_buffers 8 5120k;
proxy_busy_buffers_size 10240k;
proxy_temp_file_write_size 10240k;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
expires off;
}
location ~ /\.git {
deny all;
}
}