Skyrider
Active member
I hope someone here has experience setting up xenforo with lxd containers. Here's what I have on the web container :
And the nginx reverse proxy server block on the proxy containing the xenforo files and database:
Now, I've attempted to include:
on many locations (both nginx proxy nginx and web nginx), but for some reason I keep getting ERR_TOO_MANY_REDIRECTS
Oddly enough the admin panel of xenforo seems to be working. Even if I disable friendly URL in the admin panel, the redirect issue persists... Can someone help me with this and if possible, share their nginx proxy/web nginx block codes? I've been trying to get this sorted for over 24 hours, and I really am not getting any further.
server {
server_name xxxxxx;
access_log /var/www/logs/access.log;
error_log /var/www/logs/error.log;
root /var/www/xxxxx.com;
index index.php index.html index.htm;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
#fastcgi_param HTTP_SCHEME https;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
And the nginx reverse proxy server block on the proxy containing the xenforo files and database:
server {
listen 80 proxy_protocol;
listen [::]:80 proxy_protocol;
server_name xxxxxxx;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://ipofthewebcontainer;
}
real_ip_header proxy_protocol;
set_real_ip_from 127.0.0.1;
listen [::]:443 proxy_protocol ssl ipv6only=on; # managed by Certbot
listen 443 proxy_protocol ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/xxxxxxx/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/xxxxxxx/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Referrer-Policy "origin";
ssl_stapling on;
ssl_stapling_verify on;
}
Now, I've attempted to include:
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
deny 159.138.0.0/16;
}
location = /showthread.php {
return 301 /threads/$arg_t/;
}
location = /member.php {
return 301 /members/$arg_u/;
}
location /install/data/ {
internal;
}
location /install/templates/ {
internal;
}
location /internal_data/ {
internal;
}
location /library/ {
internal;
}
location /src/ {
internal;
}
error_page 404 /index.php;
on many locations (both nginx proxy nginx and web nginx), but for some reason I keep getting ERR_TOO_MANY_REDIRECTS
Oddly enough the admin panel of xenforo seems to be working. Even if I disable friendly URL in the admin panel, the redirect issue persists... Can someone help me with this and if possible, share their nginx proxy/web nginx block codes? I've been trying to get this sorted for over 24 hours, and I really am not getting any further.
Last edited: