entelechy
Active member
The sites running an SSL and works fine with the configuration prior to trying to get friendly urls happening.
I followed (https://xenforo.com/help/friendly-urls/), but everything except / is throwing 404's. After every modification I've restarting nginx each time.
The server block as it stands right now:
server {
root /var/www/my-forum.com/html;
index index.php index.html;
server_name my-forum.com www.my-forum.com;
location / {
try_files $uri $uri/ /var/www/my-forum.com/html/index.php?$uri&$args;
}
location /install/data/ {
internal;
}
location /install/templates/ {
internal;
}
location /internal_data/ {
internal;
}
location /library/ {
internal;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
include snippets/fastcgi-php.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/my-forum.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/my-forum.com/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
}
I followed (https://xenforo.com/help/friendly-urls/), but everything except / is throwing 404's. After every modification I've restarting nginx each time.
The server block as it stands right now:
server {
root /var/www/my-forum.com/html;
index index.php index.html;
server_name my-forum.com www.my-forum.com;
location / {
try_files $uri $uri/ /var/www/my-forum.com/html/index.php?$uri&$args;
}
location /install/data/ {
internal;
}
location /install/templates/ {
internal;
}
location /internal_data/ {
internal;
}
location /library/ {
internal;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
include snippets/fastcgi-php.conf;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/my-forum.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/my-forum.com/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
}
Last edited: