Home > Backend Development > PHP Tutorial > php-nginx+PHP配置问题?搞不懂

php-nginx+PHP配置问题?搞不懂

WBOY
Release: 2016-06-02 11:31:52
Original
828 people have browsed it

nginxphpfastcgi

我的项目的静态html和php页面在/home/myapp/web下,但是我想访问的路径为/aaa/bbb然后我配置了一个
location /aaa/bbb {
alias /home/myapp/web;
}
静态html访问没问题了,但是访问php一直是file not found
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /home/myapp/web$fastcgi_script_name;
include /conf/fastcgi_params;
}
请问当实际访问路径,和页面实际存储路径不一致的情况下应该怎么配置

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template