31 lines
596 B
Plaintext
31 lines
596 B
Plaintext
|
server {
|
||
|
listen 80;
|
||
|
server_name default;
|
||
|
|
||
|
root /var/www/html;
|
||
|
index index.php;
|
||
|
|
||
|
client_max_body_size 5m;
|
||
|
client_body_timeout 60;
|
||
|
|
||
|
location / {
|
||
|
try_files $uri $uri/ @rewrite;
|
||
|
}
|
||
|
|
||
|
location @rewrite {
|
||
|
rewrite ^/(.*)$ /index.php;
|
||
|
}
|
||
|
|
||
|
location ~ \.php$ {
|
||
|
include fastcgi_params;
|
||
|
fastcgi_pass unix:/run/php/php-fpm.sock;
|
||
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||
|
}
|
||
|
|
||
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
|
||
|
try_files $uri /index.php;
|
||
|
expires max;
|
||
|
log_not_found off;
|
||
|
}
|
||
|
}
|