NGINX configuration

This commit is contained in:
Jeff Keller
2025-10-02 16:03:23 +00:00
parent dd91d1e7da
commit 79cec583d9

View File

@@ -1 +1,33 @@
server {
listen 20211;
server_name _; #change this to your custom domain if you have one
# Web-interface files location
root /var/www/html/netalertx;
# Main page
index index.php;
#rewrite /app/(.*) / permanent;
add_header X-Forwarded-Prefix "/netalertx" always;
proxy_set_header X-Forwarded-Prefix "/netalertx";
# Specify a character set
charset utf-8;
location / {
# Try to serve files directly, fallback to index.php
try_files $uri $uri/ /index.php?$query_string;
}
# FastCGI configuration for PHP
location ~ \.php$ {
# Use a Unix socket for better performance
fastcgi_pass unix:/var/run/php/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param QUERY_STRING $query_string;
include fastcgi_params;
}
}