]>
Commit | Line | Data |
---|---|---|
0a6585a2 | 1 | server{ |
2 | ||
3 | listen 80; | |
4 | server_name localhost; | |
5 | # ssl on; | |
6 | # ssl_certificate /path/to/fullchain.pem; | |
7 | # ssl_certificate_key /path/to/privkey.pem; | |
8 | # ssl_protocols TLSv1.2 TLSv1.3; | |
9 | # ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; | |
10 | # ssl_ecdh_curve secp384r1; | |
11 | ||
12 | root /var/www/uguu/dist/; | |
13 | autoindex on; | |
14 | access_log on; | |
15 | index index.html index.php; | |
16 | ||
17 | location ~* \.(css|js|jpg|jpeg|gif|png|ico|xml|eot|woff|woff2|ttf|svg|otf|x-icon|avif|webp|apng)$ { | |
18 | expires 30d; | |
19 | } | |
20 | ||
21 | location ^~ /files/ { | |
22 | alias /var/www/files/; | |
23 | index index.html index.htm; | |
24 | autoindex off; | |
25 | include mime.types; | |
26 | types { | |
27 | text/plain php; | |
28 | } | |
29 | } | |
30 | gzip on; | |
31 | gzip_min_length 1000; | |
32 | gzip_comp_level 6; | |
33 | gzip_proxied any; | |
34 | gzip_types text/css text/js text/javascript application/javascript application/x-javascript; | |
35 | ||
36 | location ~* \.php$ { | |
37 | fastcgi_pass unix:/var/run/php/php8.0-fpm.sock; | |
38 | fastcgi_intercept_errors on; | |
39 | fastcgi_index index.php; | |
40 | fastcgi_split_path_info ^(.+\.php)(.*)$; | |
41 | include fastcgi_params; | |
42 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
43 | } | |
44 | } |