Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

/blog change root

$
0
0
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

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>