-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault_nginx.conf
29 lines (27 loc) · 961 Bytes
/
default_nginx.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
server {
listen 80;
server_name laravel-vm;
root /var/www/laravel-vm/public;
index index.php index.html index.htm;
client_max_body_size 64m;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~* /storage/.*\.(php|php3|php4|php5|php6|phtml|pl|asp|aspx|cgi|dll|exe|shtm|shtml|fcg|fcgi|fpl|asmx|pht|py|psp|rb|var)$ {
types {
text/plain text/plain php php3 php4 php5 php6 phtml pl asp aspx cgi dll exe ico shtm shtml fcg fcgi fpl asmx pht py psp rb var;
}
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht { deny all; }
location ~ /\.svn { deny all; }
location ~ /\.git { deny all; }
}