nginx怎么配置php环境呢?
服务器上有java环境,用的nginx做跳转,但是现在需要安装一个bbs 用的是开源的dz 现在需要怎么配置nginx呢?搞了半天都没弄出来,求高手啊~
更新时间:2021-09-21 19:09
最满意答案
是指nginx配置有问题吗?还是其他方面 安装系统依赖包
yum install make apr* autoconf automake curl curl-devel gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel gd kernel keyutils patch perl kernel-headers compat* mpfr cpp glibc libgomp libstdc++-devel ppl cloog-ppl keyutils-libs-devel libcom_err-devel libsepol-devel libselinux-devel krb5-devel zlib-devel libXpm* freetype libjpeg* libpng* php-common php-gd ncurses* libtool* libxml2 libxml2-devel patch |
tar -zxvf libmcrypt-2.5.7.tar.gz cd libmcrypt-2.5.7 ./configure --prefix=/usr/local/libmcrypt make make install |
安装pcre
tar -zxvf pcre-8.30.tar.gz cd pcre-8.30 ./configure --prefix=/usr/local/pcre make make install |
tar -zxvf cmake-2.8.7.tar.gz cd cmake-2.8.7 ./configure make make install |
wget http://www.openssl.org/source/openssl-1.0.1.tar.gz tar -zxvf openssl-1.0.1.tar.gz groupadd www useradd -g www www -s /bin/false tar -zxvf nginx-1.2.3.tar.gz vi nginx-1.2.3/auto/cc/gcc # debug #CFLAGS="$CFLAGS -g" cd nginx-1.2.3 ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-openssl=/data/openssl-1.0.1 --with-pcre=/data/pcre-8.30 --with-md5=/usr/lib --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --with-cc-opt='-O3' make make install clean chown www:www /usr/local/nginx/html/ -R |
chmod 755 /etc/rc.d/init.d/nginx chkconfig --add nginx chkconfig --level 345 nginx on /usr/local/nginx/sbin/nginx ps -ef|grep nginx root 16983 1 0 11:08 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx www 16984 16983 0 11:08 ? 00:00:00 nginx: worker process root 16986 2599 0 11:08 pts/0 00:00:00 grep nginx netstat -nat|grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN |
vi /usr/local/nginx/conf/nginx.conf user www www; location / { root html; index index.php; } location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; #fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } |
其他回答
需要的话 联系我 发你邮箱
相关问答
更多-
windows环境下使用nginx,如何支持php?[2021-11-20]
使用nginx+php集成包phpfind或phpstudy即可一键安装好环境。还支持php版本一键切换,带控制面板的,纯中文绿色解压即可,完全符合国人使用习惯,你试试吧 -
如何配置PHP的运行环境[2019-03-21]
PHP开发环境配置(Windows版) Apache+MySQL+PHP+phpMyAdmin 我的系统:Windows XP Author:usnay Time:2009-7-7 Step1:下载以下文件 (1)php-5.2.0-Win32.zip pecl-5.2.0-Win32.zip 下载地址:[url]http://www.php.net/downloads.php[/url] (2)apache_2.2.3-win32-x86-no_ssl.msi 下载地址:[url]http://http ... -
windows下配置nginx的PHP环境[2021-09-06]
你别在用户目录里直接运行,这样他会把当前目录看错是用户目录了 D:(先换到D盘) cd wnmp/nginx(切换到NGINX的根目录) nginx(执行nginx.exe) 话说windows下不是可以直接双击nginx.exe的么 -
CentOs5.4下配置nginx+php环境[2021-05-01]
我昨天从网上看到,nginx 0day漏洞 上传图片可入侵百万台服务器,我想如果是自己用VM虚拟机练练手还好,要是做服务器,可得小心了. -
window+nginx+php环境配置 附配置搭配说明[2019-03-26]
1,下载PHP php下载版本比较多,其中, vc9=vs2008编译,推荐使用IIS+php搭配模式, vc6=vs6编译,推荐使用apache+php方式搭配, Thread Safe,线程安全,执行时会进行线程(Thread)安全检查,以防止有新要求就启动新线程的CGI执行方式而耗尽系统资源。Non Thread Safe是非线程安全,在执行时不进行线程(Thread)安全检查。 Non Thread Safe, 再来看PHP的两种执行方式:ISAPI和FastCGI。 I ... -
CentOs5.4下配置nginx+php环境[2019-03-26]
我昨天从网上看到,nginx 0day漏洞 上传图片可入侵百万台 服务器,我想如果是自己用VM 虚拟机练练手还好,要是做服务器,可得小心了. -
nginx怎么配置php环境呢?[2021-09-21]
是指nginx配置有问题吗?还是其他方面 安装系统依赖包 yum install make apr* autoconf automake curl curl-devel gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel gd kernel keyutils patch perl kernel-headers compat* mpfr cpp glibc libgomp libstdc++-devel ppl cloog-ppl keyutils- ... -
nginx怎么配置pgp环境?我是通过yum安装的[2019-03-27]
已经安装好了! -
PHP+FastCGI+Nginx配置PHP运行环境[2021-05-20]
CGI的英文全称为Common Gateway Interface(公共网关接口),是Nginx和动态脚本程序的桥梁,Nginx通过FastCGI接口将动态请求发送给FastCGI,FastCGI中的Wrapper进程生成一个线程,将请求交给脚本解释程序执行,然后通过原来的socket将解释执行后的结果原路返回给Nginx,之后Nginx将结果交给客户端。 Nginx是通过套接字文件socket来将动态请求发送给wrapper,使用的是Tcp协议。wrapper通过CGI接口来接受请求。这样web服务器和解 ... -
配置php环境能不能不安装apache[2021-09-29]
可以的,具体步骤推荐给你一个连接,上面有完整步骤 网页链接