Nginx: send requests to router.php
This commit is contained in:
parent
3b91f27f10
commit
fac31597e4
|
@ -3,25 +3,22 @@ server {
|
|||
listen 127.0.0.1:42443 ssl http2;
|
||||
server_name niver.test;
|
||||
|
||||
root /srv/niver/core/public;
|
||||
index index.php index.html index.htm;
|
||||
try_files $uri $uri/ @extensionless-php;
|
||||
root /srv/niver/core;
|
||||
|
||||
include inc/tls.conf;
|
||||
include inc/errors.conf;
|
||||
|
||||
more_set_headers "Content-Security-Policy : default-src 'none'; style-src 'self'; frame-ancestors 'none'; form-action 'self';";
|
||||
|
||||
location ~ \.php$ {
|
||||
location / {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/run/php-fpm/niver.sock;
|
||||
#fastcgi_index index.php;
|
||||
include inc/fastcgi.conf;
|
||||
try_files $uri =404;
|
||||
try_files /router.php =500;
|
||||
}
|
||||
|
||||
location @extensionless-php {
|
||||
rewrite ^(.*)$ $1.php last;
|
||||
location /css {
|
||||
alias /srv/niver/core/css;
|
||||
}
|
||||
|
||||
location /docs {
|
||||
|
|
Loading…
Reference in New Issue