Nginx with xenforo error ???

Lamnguyen

New member
Joined
May 23, 2015
Messages
1
I install apache + nginx + php-fpm56 (directadmin).
I used xenforo and error (sometime):
- When delete post (xenforo):
Not Found

The requested URL /inline-mod/thread/switch was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
-When login to admin or save options (xenforo):
File not found.


/usr/local/directadmin/data/users/admin/nginx.conf
# Auto generated nginx config file by DirectAdmin version 1.48.0
# Modifying this file is not recommended as any changes you make will be
# overwritten when the user makes any changes to his/her website

# For global config changes that affect all Users, see this guide:
# http://help.directadmin.com/item.php?id=558
# For local config changes that only affect one User, see this guide:
# http://help.directadmin.com/item.php?id=3


server
{
listen x.x.x.x:80;
server_name yyy.org www.yyy.org ;
access_log /var/log/nginx/domains/yyy.org.log;
access_log /var/log/nginx/domains/yyy.org.bytes bytes;
error_log /var/log/nginx/domains/yyy.org.error.log;
root /home/admin/domains/yyy.org/public_html;
index index.php index.html index.htm;
include /usr/local/directadmin/data/users/admin/nginx_php.conf;
location /
{
# access_log off;
proxy_buffering off;
proxy_pass http://x.x.x.x:8080;
proxy_set_header X-Client-IP $remote_addr;
proxy_set_header X-Accel-Internal /nginx_static_files;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /nginx_static_files/
{
# access_log /var/log/nginx/access_log_proxy;
alias /home/admin/domains/yyy.org/public_html/;
internal;
}
# include /etc/nginx/webapps.conf;

# nginx configuration
error_page 500 default;
error_page 404 default;
error_page 403 default;
location /data/ {
}
location /js/ {
}
location /styles/ {
}
location /install/ {
}
location = /favicon.ico {
}
location = /crossdomain.xml {
}
location = /robots.txt {
}

}

.htaccess
# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

<IfModule mod_rewrite.c>

RewriteEngine On

# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo

# This line may be needed to enable WebDAV editing with PHP as a CGI.
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
 
Hello,

Are you sure you use nginx+apache? Or stand alone NGINX?
If the second is your case, then you need either use nginx+apache or transform mod_rewrite rules to the way it's supported by nginx.
 
Back
Top