For reference purposes. Feel free to modify this as you'd like.
parent
82b2a136cd
commit
6891cba945
1 changed files with 47 additions and 0 deletions
47
Using-Szurubooru-on-Nginx.md
Normal file
47
Using-Szurubooru-on-Nginx.md
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
Place this in your nginx configuration block. Configure as necessary.
|
||||||
|
Here we are using PHP5 with PHP-FPM.
|
||||||
|
|
||||||
|
server {
|
||||||
|
|
||||||
|
listen 420;
|
||||||
|
|
||||||
|
root /path/to/your/installation;
|
||||||
|
index dispatch.php
|
||||||
|
|
||||||
|
server_name www.example.com example.com;
|
||||||
|
|
||||||
|
location = /favicon.ico {
|
||||||
|
log_not_found off;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_page 500 /dispatch.php?request=error/http&code=500;
|
||||||
|
|
||||||
|
error_page 404 /dispatch.php?request=error/http&code=404;
|
||||||
|
|
||||||
|
error_page 403 /dispatch.php?request=error/http&code=403;
|
||||||
|
|
||||||
|
autoindex off;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
if (!-e $request_filename){
|
||||||
|
rewrite ^(.*)$ /dispatch.php;
|
||||||
|
}
|
||||||
|
rewrite ^/?$ /dispatch.php;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
|
||||||
|
access_log off; log_not_found off; expires max;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
try_files $uri =404;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
# fastcgi_intercept_errors on;
|
||||||
|
fastcgi_pass 127.0.0.1:9000;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Reference in a new issue