forked from givanz/Vvveb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx-live-nocache.conf
executable file
·78 lines (62 loc) · 2.16 KB
/
nginx-live-nocache.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
#replace vvveb with your website domain and folder
#copy this file to /etc/nginx/sites-available/vvveb
#sudo ln -s /etc/nginx/sites-available/vvveb /etc/nginx/sites-enabled/vvveb
#this configuration does not support page cache for advanced configuration with page cache support use nginx.conf
server {
listen 80;
listen [::]:80;
#listen 443 ssl http2;
server_name vvveb.com www.vvveb.com;
root /var/www/vvveb/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
add_header X-Powered-By "Vvveb";
#ssl_certificate /etc/letsencrypt/live/vvveb.com/fullchain.pem;
#ssl_certificate_key /etc/letsencrypt/live/vvveb.com/privkey.pem;
index index.html index.htm index.php;
gzip on;
gzip_vary on;
gzip_min_length 10240;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
#charset utf-8;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
#add domain to sitemaps for multisite
location = /robots.txt {
log_not_found off;
access_log off;
try_files $uri /index.php$is_args$args;
}
#static files
location ~* "\.(?!php)([\w]{3,5})$" {
expires max;
log_not_found off;
sendfile on;
sendfile_max_chunk 1m;
fastcgi_hide_header "Set-Cookie";
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ /media/.+?\.php$ {
deny all;
}
location ~ \.php$ {
#fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
include fastcgi.conf;
fastcgi_pass php;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
}
location ~ /\.(?!well-known).* {
deny all;
}
}