Cupara
Well-known member
I know this has been discussed, I have seen the threads, tried suggestions, even tried to alter from XenForo 1.5 suggestions to work with 2.0.0 but I know PHP, not rewrite rules. LOL
So here is my problem, I run nginx, I used the information here, https://xenforo.com/help/friendly-urls/, but still does not work. I have added the information to the additional directives box for nginx on my Plesk Onyx install. I had it working at one point but javascript and other parts would not load so I scrapped it and started over. Now I'm here asking for guidance.
My XenForo is installed in the root directory, but I have it set to access forums using /forums/ so that I can set my portal on the main page.
Here is my nginx.conf under my domain vhosts folder.
This is my additional directives:
All I get now is 404 error pages. I have manually changed the nginx.conf file for my domain to include those parameters under 'location /' but still no change.
I have also attached a screenshot of my nginx settings via plesk.
Give me Apache and I can do this all day but nginx is default for Plesk from Digital Ocean and I would rather stick with nginx instead of redoing the server and having more of a headache.
Thanks
So here is my problem, I run nginx, I used the information here, https://xenforo.com/help/friendly-urls/, but still does not work. I have added the information to the additional directives box for nginx on my Plesk Onyx install. I had it working at one point but javascript and other parts would not load so I scrapped it and started over. Now I'm here asking for guidance.
My XenForo is installed in the root directory, but I have it set to access forums using /forums/ so that I can set my portal on the main page.
Here is my nginx.conf under my domain vhosts folder.
Code:
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
server {
listen 45.55.55.238:443 ssl http2;
server_name goblintimes.com;
server_name www.goblintimes.com;
server_name ipv4.goblintimes.com;
ssl_certificate /usr/local/psa/var/certificates/ce$
ssl_certificate_key /usr/local/psa/var/certificates/ce$
ssl_client_certificate /usr/local/psa/var/certificates/ce$
client_max_body_size 128m;
root "/var/www/vhosts/goblintimes.com/httpdocs";
access_log "/var/www/vhosts/system/goblintimes.com/logs/proxy_$
error_log "/var/www/vhosts/system/goblintimes.com/logs/proxy_e$
if ($host ~* ^www\.goblintimes\.com$) {
rewrite ^(.*)$ https://goblintimes.com$1 permanent;
}
location / {
proxy_pass https://IP:7081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forward$
proxy_set_header X-Accel-Internal /internal-nginx-stat$
access_log off;
}
location /internal-nginx-static-location/ {
alias /var/www/vhosts/goblintimes.com/httpdocs/;
internal;
}
location ~ ^/(plesk-stat|awstats-icon|webstat|webstat-ssl|ftps$
proxy_pass https://IP:7081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forward$
proxy_set_header X-Accel-Internal /internal-nginx-stat$
access_log off;
}
location ~ ^/~(.+?)(/.*?\.php)(/.*)?$ {
alias /var/www/vhosts/goblintimes.com/web_users/$1/$2;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass "unix:///var/www/vhosts/system/goblintime$
include /etc/nginx/fastcgi.conf;
}
location ~ ^/~(.+?)(/.*)?$ {
proxy_pass https://IP:7081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forward$
proxy_set_header X-Accel-Internal /internal-nginx-stat$
access_log off;
}
location ~ \.php(/.*)?$ {
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass "unix:///var/www/vhosts/system/goblintime$
include /etc/nginx/fastcgi.conf;
}
location ~ /$ {
index "index.html" "index.cgi" "index.pl" "index.php" $
}
add_header X-Powered-By PleskLin;
include "/var/www/vhosts/system/goblintimes.com/conf/vhost_ngi$
}
server {
listen IP:80;
server_name goblintimes.com;
server_name www.goblintimes.com;
server_name ipv4.goblintimes.com;
client_max_body_size 128m;
return 301 https://$host$request_uri;
}
This is my additional directives:
Code:
location /forums/ {
try_files $uri $uri/ /forums/index.php?$uri&$args;
index index.php index.html;
}
location /forums/install/data/ {
internal;
}
location /forums/install/templates/ {
internal;
}
location /forums/internal_data/ {
internal;
}
location /forums/library/ {
internal;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
All I get now is 404 error pages. I have manually changed the nginx.conf file for my domain to include those parameters under 'location /' but still no change.
I have also attached a screenshot of my nginx settings via plesk.
Give me Apache and I can do this all day but nginx is default for Plesk from Digital Ocean and I would rather stick with nginx instead of redoing the server and having more of a headache.
Thanks
Attachments
Last edited: