WDlinux官方论坛's Archiver

itkubo 发表于 2012-7-3 01:22

安装了LANMP环境如何让其中的项目单独使用Nginx+php?

我的vps是Centos5.5 , 安装了LANMP,但是现在我有个项目需要单独使用Nginx+php来运行,请问需要怎么修改vhost文件?
下面是示例vhost config



*******************www_abc_com.conf 文件内容:***************************

server {
        listen       80;
        server_name www_abc_com;
        root /www/web/www_abc_com/public_html;
        index  index.html index.php index.htm;
        error_page  400 /errpage/400.html;
        error_page  403 /errpage/403.html;
        error_page  404 /errpage/404.html;
        location ~ \.php$ {
                proxy_pass [url=http://127.0.0.1:88]http://127.0.0.1:88[/url];
                include naproxy.conf;
        }
        location / {
                try_files $uri @apache;
        }
        location @apache {
                 proxy_pass [url=http://127.0.0.1:88]http://127.0.0.1:88[/url];
                 include naproxy.conf;
        }
}

********************************************************************************

如何修改(能不能修改)使用Nginx直接使用php处理程序,而不是通过代理。

谢谢!

itxx 发表于 2012-7-3 08:24

wdcp后台有一个切换引擎的功能,你手工切换至nginx+php然后观察下配置文件,按照相同的配置就可以,前提是确保相应的服务启动。

admin 发表于 2012-7-3 09:04

安装全部,也就是支持切换的环境,然后手工修改某个需要的项目,然后手工启动php-fpm

具体的配置,可参考2楼所说

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.