Files
FOSSBilling/data/nginx.conf
T
Jaap Marcus 53fd0f5c3e Improve nginx example config (#326)
Add extra comment regarding

Removed as it does nothing
         proxy_no_cache 1;
         proxy_cache_bypass 1;
2022-10-10 03:33:05 -07:00

52 lines
1.3 KiB
Nginx Configuration File

server {
listen 80;
set $root_path '/var/www/fossbilling/src';
server_name fossbilling.vm www.fossbilling.vm;
index index.html index.htm index.php;
root $root_path;
try_files $uri $uri/ @rewrite;
sendfile off;
include /etc/nginx/mime.types;
location @rewrite {
rewrite ^/(.*)$ /index.php?_url=/$1;
}
location ~ \.php {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# fastcgi_pass need to be changed according your server setup:
# phpx.x is your server setup
# examples: /var/run/phpx.x-fpm.sock, /var/run/php/phpx.x-fpm.sock or /run/php/phpx.x-fpm.sock are all valid options
# Or even localhost:port (Default 9000 will work fine)
# Please check your server setup
fastcgi_pass unix:/run/php/phpx.x-fpm.sock
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
include fastcgi_params;
}
# Disable PHP execution in bb-uploads and bb-data
location ^~ /bb-uploads/ { }
location ^~ /bb-data/ {
deny all;
}
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root $root_path;
expires off;
}
location ~ /\.ht {
deny all;
}
}