mirror of
https://github.com/torrentpier/torrentpier.git
synced 2025-03-03 06:17:18 -08:00
* feat(web servers configs): Added configuration files for `nginx` & `caddy` * Update nginx.conf * Updated * Update Caddyfile * Update Caddyfile * Update Caddyfile * Update Caddyfile
40 lines
859 B
Nginx Configuration File
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;
|
|
}
|
|
}
|