一、下載 windows Mainline version nginx,按官方檔案安裝
二、下載 php7.3 并解壓到作業目錄
三、以管理員身份打開 cmd,進入 php 目錄,輸入如下命令,!!! 電腦不關機,此cmd視窗不關閉 !!!
E:\php7.3>php-cgi.exe -b 127.0.0.1:9000
四、配置 nginx(復制如下配置覆寫原配置)
# 支持 PHP_INFO location / { root E:/Apache/htdocs/site/; index index.php index.html index.htm; if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } } # 決議 php 檔案 location ~ \.php { root E:/Apache/htdocs/site/; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; include fastcgi_params; }
五、啟動 nginx
E:\nginx-1.17.9>nginx -s stop fast shutdown E:\nginx-1.17.9>nginx -s quit graceful shutdown E:\nginx-1.17.9>nginx -s reload changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes E:\nginx-1.17.9>nginx -s reopen re-opening log files
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/59833.html
標籤:PHP
上一篇:[PHP] 解決mysql下1366 Incorrect string value錯誤
下一篇:春招面試、直接被面試官給吊打了?
