rkxh
Member
Hello everyone, I oddly run into the issue that friendly URLs are only partially working with NGINX and friendly URLs enabled.
Here is the config, which matches the docs:
I am not sure if this is caused by the recent change from the www. sub-domain to non-www.
Board URL was changed from http:// to https:// as well, which should be fine?
Here is the config, which matches the docs:
NGINX:
server {
listen 80;
server_name www.forum.tld forum.tld;
if ($host = www.forum.tld) {
return 301 https://forum.tld$request_uri;
} # managed by Certbot
if ($host = forum.tld) {
return 301 https://forum.tld$request_uri;
} # managed by Certbot
}
server {
listen 443 ssl;
server_name www.forum.tld forum.tld;
# HTTP Headers
http2 on;
#Logs
access_log off;
error_log off;
root /home/forum;
# Headers
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
add_header X-Content-Type-Options nosniff;
# SSL
ssl_certificate /etc/letsencrypt/live/forum/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/forum/privkey.pem; # managed by Certbot
ssl_trusted_certificate /etc/letsencrypt/live/forum/fullchain.pem;
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 1d;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
resolver 8.8.8.8 8.8.4.4;
# PageSpeed
pagespeed off;
# Rewrites
location / {
try_files $uri $uri/ /index.php?$uri&$args;
index index.php index.html;
}
location ^~ /install/data/ {
internal;
}
location ^~ /install/templates/ {
internal;
}
location ^~ /internal_data/ {
internal;
}
location ^~ /library/ {
internal;
}
location ^~ /src/ {
internal;
}
# PHP-FPM
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
I am not sure if this is caused by the recent change from the www. sub-domain to non-www.
Board URL was changed from http:// to https:// as well, which should be fine?