nginx+php整合(是讓nginx可以運行php,以及下載地址)
阿新 • • 發佈:2018-11-21
class sql nginx -t code 其他 選擇 mysql 需要 stop
下載地址:
nginx:http://nginx.org/en/download.html
PHP: https://windows.php.net/download/
都是官網的自己選擇版本
安裝文件目錄:
nginx: D:\wcnm\Nginx\nginx-12
PHP: D:\wcnm\PHP\PHP\php-7.2.12
nginx中的conf/nginx.conf配置
位置如下:
修改內容
端口最好80其他也行,發不出去需要80,
下面註意:
如果出現
nginx -t(查看配置文件是否有錯)
報錯:
nginx 沒有啟動的話就不能啟動了,會報錯
nginx其他命令
啟動: start nginx
關閉: nginx -s stop
重載配置文件:nginx -s reload
php運行命令 :php-cgi -b 127.0.0.1:9000 -c php.ini
需要在nginx上運行php那麽上面的那一條命令需要運行將nginx啟動配置成功後運行。
警告是添加了php_mysql.dll和php_mysqli.dll
這個是PHP的不關nginx的事,並且不能關閉上面的哪一個窗口。
nginx+php整合(是讓nginx可以運行php,以及下載地址)