Add example nginx configuration
As a first approximation.
This commit is contained in:
parent
d2caa09585
commit
05da20bb73
1 changed files with 50 additions and 0 deletions
50
nginx.dist.conf
Normal file
50
nginx.dist.conf
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
#
|
||||||
|
# Example nginx configuration for forkbb
|
||||||
|
#
|
||||||
|
server {
|
||||||
|
listen 80; # 80 port only http:
|
||||||
|
server_name forkbb.local *.forkbb.local; # you need to set your values
|
||||||
|
root "/www/forkbb/public"; # you need to set your values
|
||||||
|
autoindex off;
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
location = /favicon.ico {
|
||||||
|
access_log off;
|
||||||
|
log_not_found off;
|
||||||
|
|
||||||
|
expires 1w;
|
||||||
|
}
|
||||||
|
|
||||||
|
location = /robots.txt {
|
||||||
|
access_log off;
|
||||||
|
log_not_found off;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/(js|img|style)/(.+)\.v\.[0-9]+\.([^.\\/]++)$ {
|
||||||
|
try_files /$1/$2.$3 =404;
|
||||||
|
|
||||||
|
expires 1y;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/(js|img|style)/ {
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /\.ht {
|
||||||
|
deny all;
|
||||||
|
|
||||||
|
access_log off;
|
||||||
|
log_not_found off;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
fastcgi_index index.dist.php;
|
||||||
|
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param HTTP_PROXY "";
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root/index.dist.php;
|
||||||
|
|
||||||
|
fastcgi_pass php_upstream; # you need to set your values
|
||||||
|
#or fastcgi_pass unix:/var/run/php-fpm.sock; # you need to set your values
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue