torrentpier/install/nginx.conf
Roman Kelesidis f7d394607e
feat: Added configuration files for nginx & caddy (#1787)
* feat(web servers configs): Added configuration files for `nginx` & `caddy`

* Update nginx.conf

* Updated

* Update Caddyfile

* Update Caddyfile

* Update Caddyfile

* Update Caddyfile
2025-02-16 16:48:13 +03:00

40 lines
859 B
Nginx Configuration File

# Example nginx configuration for TorrentPier
server {
listen 80; # port
server_name example.com; # your domain
root /path/to/root; # folder with TorrentPier installed
index index.php;
charset utf-8;
location / {
try_files \$uri \$uri/ /index.php?\$args;
}
location ~ \/(install|internal_data|library)\/ {
return 404;
}
location ~ /\.(ht|en) {
return 404;
}
location ~ /\.git {
return 404;
}
location ~ \.(.*sql|tpl|db|inc|log|md)$ {
return 404;
}
rewrite ^/sitemap.xml$ /sitemap/sitemap.xml;
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
include fastcgi_params;
}
}