server {
listen 8080 default_server;
server_name _;
root /var/www/xenforo/public;
index index.php index.html;
# =========================
# XenForo
# =========================
location / {
try_files $uri $uri/ /index.php?$args;
}
# =========================
# phpMyAdmin STATIC
# =========================
location /phpmyadmin {
root /usr/share;
index index.php;
}
# =========================
# phpMyAdmin PHP
# =========================
location ~ ^/phpmyadmin/(.+\.php)$ {
root /usr/share;
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# =========================
# XenForo PHP
# =========================
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}