日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程语言 > php >内容正文

php

nginx解析php失败,为什么nginx不能解析php?

發(fā)布時間:2023/12/3 php 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 nginx解析php失败,为什么nginx不能解析php? 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

只運行過這些代碼

yum?install?-y?vim?wget?zip?unzip??git?httpd?php?php-mysql?php-odbc?php-ldap?php-gd?php-mbstring?php-xml?php-xml-rpc?php-bcmath?libjpeg*?mariadb?;

rpm?-Uvh?http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm;

yum?install?-y?nginx;

service?nginx?start

systemctl?enable?nginx.service

firewall-cmd?--zone=public?--add-port=80/tcp?--permanent

firewall-cmd?--reload

我是centos7

這個是nginx的配置

server?{

listen???80;

root?/usr/share/nginx/html/mysite;

index?index.html?index.htm?index.php;

server_name?localhost;

location?/?{

#?URL重寫支持

try_files?$uri?$uri/?/index.php?s=$uri&$args;

}

#?開啟PHP支持

location?~?\.php?{

fastcgi_split_path_info?^(.+\.php)(.*)$;

fastcgi_pass?unix:/var/run/php5-fpm.sock;

fastcgi_index?index.php;

fastcgi_param?PATH_INFO?$fastcgi_path_info;

#?環(huán)境變量

fastcgi_param?CT_DEV_MODE?'true';

#?加載Nginx默認(rèn)"服務(wù)器環(huán)境變量"配置

include?fastcgi_params;

}

}

頁面提示403 Forbidden還有nginx的版本號

總結(jié)

以上是生活随笔為你收集整理的nginx解析php失败,为什么nginx不能解析php?的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。