檢視nginx/error.log
報錯:primary script unknown nginx
修改nginx**的配置
nginx的config啟動檔案:ps -ef | grep nginx
-v 顯示 nginx 的版本
-v 顯示 nginx 的版本,編譯器版本和配置引數。
預設配置:
server將其修改為:#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#error_page 500 502 503 504 /50x.html;
location = /50x.html
# proxy the php scripts to apache listening on 127.0.0.1:80
##location ~ \.php$
# pass the php scripts to fastcgi server listening on 127.0.0.1:9000
##location ~ \.php$
# deny access to .htaccess files, if apache's document root
# concurs with nginx's one
##location ~ /\.ht
}
server網上說 /scripts 改成 $document_root,不過還是沒有識別到#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#error_page 500 502 503 504 /50x.html;
location = /50x.html
# proxy the php scripts to apache listening on 127.0.0.1:80
##location ~ \.php$
# pass the php scripts to fastcgi server listening on 127.0.0.1:9000
#location ~ \.php$
# deny access to .htaccess files, if apache's document root
# concurs with nginx's one
##location ~ /\.ht
}
php重啟 sudo service php-fpm restart
nginx重啟:service nginx restart
虛擬機器host網域名稱配置:
nginx指向網域名稱,專案
vi /usr/local/nginx/conf/nginx.conf server同級再建乙個server配置
serverlinux 下hosts檔案詳解:error_page 500 502 503 504 /50x.html;
location = /50x.html
location ~ \.php$
}
物理機訪問虛擬機器host網域名稱:
搭建docker+swoole+php7 的環境(沒什麼用):
搭建docker+swoole+php7 的環境 github(沒什麼用):
linux centos下安裝docker:
基於docker部署php7開發環境:
docker學習筆記:
實用github映象:
docker 搭建 lnmp 環境
這幾天學了 docker 又用 docker 搭建了自己的環境。這中間遇到了很多坑,為此特意寫此博文,供你們搭建環境的時候借鑑。本篇本章預設你有 docker 的基本知識 本篇用到的環境 實踐 搭建 dockerfile 首先我們編寫我們的 dockerfile mysql from mysql 5...
Docker搭建LNMP環境
關於什麼是docker,建議大家先上網查查有關的用法。如果您不了解,在這篇文章中,您可以簡單的理解為他是乙個輕量級的虛擬機器。一 docker安裝mysql 首先,我們從倉庫拉取乙個mysql的映象 docker pull mysql 5.6然後我們可以通過命令 docker images 檢視我們...
docker搭建lnmp環境
四 參考 有收穫的話請加顆小星星,沒有收穫的話可以反對沒有幫助舉報三連 from 指定基礎映象 from 映象 from php 7.2 fpm run 執行 run 命令 orrun 可執行檔案 引數1 引數2 run echo usr share nginx html index.html ru...