50 lines
1.0 KiB
Plaintext
50 lines
1.0 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name 10.0.0.10;
|
|
|
|
root /var/www/perlite;
|
|
index index.php index.html index.htm;
|
|
|
|
access_log /var/log/nginx/php-access.log;
|
|
error_log /var/log/nginx/php-error.log;
|
|
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php;
|
|
}
|
|
|
|
# PHP-FPM Configuration Nginx
|
|
location ~ \.php$ {
|
|
try_files $uri = 404;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass perlite:9000;
|
|
fastcgi_index index.php;
|
|
include fastcgi_params;
|
|
fastcgi_param REQUEST_URI $request_uri;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
}
|
|
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
|
|
location ~* ^/(.*)/.obsidian/appearance.json$ {
|
|
allow all;
|
|
}
|
|
|
|
location ~* ^/(.*)/.obsidian/(.*)/theme.css$ {
|
|
allow all;
|
|
}
|
|
|
|
location ~ \.(git|github|obsidian|trash) {
|
|
deny all;
|
|
}
|
|
|
|
location ~ \.(md|json)$ {
|
|
deny all;
|
|
}
|
|
|
|
|
|
}
|