|
我想将nginx部署到我的服务器下配置如下:
server {
listen 80;
server_name ca.sise.com.cn;
charset utf-8;
root /home/www/drupal;
.......................................
location ~ ^/carepair/.+\.php($|/) {
alias /home/www/carepair/;
index index.php;
if (-f $request_filename) {
expires max;
break;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/www/carepair/index.php; #$document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_TRANSLATED /home/www/carepair/index.php; #$document_root$fastcgi_path_info;
include fastcgi_params;
access_log /var/log/nginx/carepair/carepair_access.log;
error_log /var/log/nginx/carepair/carepair_error.log;
}
location ~ ^/carepair($|/.*) {
alias /home/www/carepair/$1;
index index.php index.html;
#rewrite ^/$/index.php last;
if (-f $request_filename) {
expires max;
break;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
}
.....................
}
省略了一堆配置,因为服务器的主目录不是CI,配置完毕之后,直接输入链接,返回的是drupal下的404,也就是页面重定向的时候有问题,有大神帮解决一下吗
|
|