-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwww.3z0.org.conf
125 lines (107 loc) · 3 KB
/
www.3z0.org.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
server {
listen 80;
listen [::]:80;
listen 443 quic;
listen 443 ssl;
listen [::]:443 quic;
listen [::]:443 ssl;
http2 on;
http3 off;
ssl_certificate_key /etc/nginx/ssl-certificates/www.3z0.org.key;
ssl_certificate /etc/nginx/ssl-certificates/www.3z0.org.crt;
server_name 3z0.org;
return 301 https://www.3z0.org$request_uri;
}
server {
listen 80;
listen [::]:80;
listen 443 quic;
listen 443 ssl;
listen [::]:443 quic;
listen [::]:443 ssl;
http2 on;
http3 off;
ssl_certificate_key /etc/nginx/ssl-certificates/www.3z0.org.key;
ssl_certificate /etc/nginx/ssl-certificates/www.3z0.org.crt;
server_name www.3z0.org www1.3z0.org;
root /home/user3z0/htdocs/www.3z0.org;
access_log /home/user3z0/logs/nginx/access.log main;
error_log /home/user3z0/logs/nginx/error.log;
if ($scheme != "https") {
rewrite ^ https://$host$request_uri permanent;
}
location ~ /.well-known {
auth_basic off;
allow all;
}
# Redirect requests without file extensions
location / {
try_files $uri $uri/ $uri.html $uri.php /index.php?$args;
}
# Proxy settings
location /proxy {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header X-Varnish;
proxy_redirect off;
proxy_max_temp_file_size 0;
proxy_connect_timeout 720;
proxy_send_timeout 720;
proxy_read_timeout 720;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
}
# Cache static files
location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map|mjs)$ {
add_header Access-Control-Allow-Origin "*";
add_header alt-svc 'h3=":443"; ma=86400';
expires max;
access_log off;
}
# Deny access to hidden files (e.g., .git, .htaccess)
location ~ /\.(ht|svn|git) {
deny all;
}
if (-f $request_filename) {
break;
}
}
server {
listen 8080;
listen [::]:8080;
server_name www.3z0.org www1.3z0.org;
root /home/user3z0/htdocs/www.3z0.org;
include /etc/nginx/global_settings;
try_files $uri $uri/ $uri.html $uri.php /index.php?$args;
index index.php index.html;
location ~ \.php$ {
include fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
try_files $uri =404;
fastcgi_read_timeout 3600;
fastcgi_send_timeout 3600;
fastcgi_param HTTPS "on";
fastcgi_param SERVER_PORT 443;
fastcgi_pass 127.0.0.1:19001;
fastcgi_param PHP_VALUE "
error_log=/home/user3z0/logs/php/error.log;
memory_limit=512M;
max_execution_time=60;
max_input_time=60;
max_input_vars=10000;
post_max_size=64M;
upload_max_filesize=64M;
date.timezone=UTC;
display_errors=off;";
}
if (-f $request_filename) {
break;
}
}