-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.default
41 lines (32 loc) · 1022 Bytes
/
example.default
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
server {
listen 80 default_server;
listen [::]:80 default_server;
charset utf-8;
root /project;
index index.php index.html index.htm index.hh;
server_name portfolio.dev;
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html|svg|ttf|woff)$ {
access_log off;
expires max;
}
location / {
try_files $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; }
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log error;
error_page 404 /index.php;
# Deny .htaccess file access
location ~ /\.ht {
deny all;
}
}