Joshua
Active member
For some reason my VPS isn't redirecting properly for friendly URLs. The forum is installed to http://www.domain.com/forum/. I'm using Nginx with Centmin Mod and I have the following in my domain.com.conf file:
Any help you can provide would be much appreciated!
Code:
server {
server_name domain.com;
rewrite ^ http://www.domain.com/forum$request_uri? permanent;
}
server {
listen 80;
server_name www.domain.com;
# ngx_pagespeed & ngx_pagespeed handler
#include /usr/local/nginx/conf/pagespeed.conf;
#include /usr/local/nginx/conf/pagespeedhandler.conf;
#include /usr/local/nginx/conf/pagespeedstatslog.conf;
# limit_conn limit_per_ip 16;
# ssi on;
access_log /home/nginx/domains/domain.com/log/access.log combined buffer=32k;
error_log /home/nginx/domains/domain.com/log/error.log;
root /home/nginx/domains/domain.com/public;
location / {
location /forum/ {
try_files $uri $uri/ /xf/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;
}
# block common exploits, sql injections etc
#include /usr/local/nginx/conf/block.conf;
# Enables directory listings when index file not found
#autoindex on;
# Shows file listing times as local time
#autoindex_localtime on;
# Enable for vBulletin usage WITHOUT vbSEO installed
#try_files / /index.php;
}
include /usr/local/nginx/conf/staticfiles.conf;
include /usr/local/nginx/conf/php.conf;
include /usr/local/nginx/conf/drop.conf;
#include /usr/local/nginx/conf/errorpage.conf;
}
Any help you can provide would be much appreciated!