forked from LiveCarta/LiveCartaWP
30 lines
807 B
Plaintext
30 lines
807 B
Plaintext
server {
|
|
listen 80;
|
|
server_name lawcarta.loc livecarta.loc localhost;
|
|
|
|
root /var/www/html;
|
|
index index.php;
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
if (!-e $request_filename) {
|
|
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
|
|
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
|
|
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$args;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
try_files $uri =404;
|
|
include fastcgi_params;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
#fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
fastcgi_pass localhost:9000;
|
|
}
|
|
} |