/blog change root
March 17, 2015 03:47PM
Hi,

i have this config:

location ^~ /blog/ {
root /home/xxx/blog.xxx.com;
index index.php index.html index.htm;

}
location / {
try_files $uri $uri/ /index.php$uri?$args;
}

location ~ "^(.+\.php)($|/)" {
# try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_read_timeout 600;
#####
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SERVER_NAME $host;
#fastcgi_read_timeout 120;

####
include fastcgi_params;
}

when i type: www.xxx.com/blog/ i have this error in error.log:

: *78226 "/home/xxx/blog.xxx.com/blog/index.php" is not found (2: No such file or directory), client: xx.114.xx.178, server: www.xxx.com, request: "GET /blog/ HTTP/1.1", host: "www.xxx.com"

how i can solve this? i need when type www.xxx.com/blog go to /home/xxx/blog.xxx.com/ (wordpress) and not /home/xxx/blog.xxx.com/blog

thanks
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 150
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready