Ranma1981
Member
Hello,
I read the topic regard the Nginx rewrite url for Xenforo, I am trying it, but it seems doesn't work well for me. I already moved all my files and database to a new VPS, where I am testing the Xenforo forum modifying the file hosts on PC.
But for the forum, I don't see it correctly and I have only 404 Not Found pages.
Actually, I have Xenforo in a subdomain, called "forum".
Here are the two codes that I tried:
1 Code
2 Code
Can you help me to understand where is the error?
Thanks!
I read the topic regard the Nginx rewrite url for Xenforo, I am trying it, but it seems doesn't work well for me. I already moved all my files and database to a new VPS, where I am testing the Xenforo forum modifying the file hosts on PC.
But for the forum, I don't see it correctly and I have only 404 Not Found pages.
Actually, I have Xenforo in a subdomain, called "forum".
Here are the two codes that I tried:
1 Code
Code:
server {
listen *:80;
server_name forum.mysite.it ;
root /var/www/mysite.it/web/forum;
location /forum/ {
try_files $uri $uri/ /forum/index.php?$uri&$args;
index index.php index.html;
}
location /forum/internal_data/ {
internal;
}
location /forum/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;
}
index index.html index.htm index.php index.cgi index.pl index.xhtml;
}
2 Code
Code:
server {
listen *:80;
server_name forum.mysite.it ;
root /var/www/mysite.it/web/forum;
location /forum/ {
try_files $uri $uri/ /forum/index.php?$uri&$args;
}
location /forum/data/ {
allow 127.0.0.1;
deny all;
}
location /forum/internal_data/ {
allow 127.0.0.1;
deny all;
}
location /forum/library/ {
allow 127.0.0.1;
deny all;
}
location ~ \.php$ {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
include fastcgi.conf;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort on;
}
Can you help me to understand where is the error?
Thanks!