Browse Source

fix bug

main
xiaoz 1 year ago
parent
commit
49a594277d
  1. 12
      dnmp.sh
  2. 4
      nginx/conf/nginx.conf

12
dnmp.sh

@ -86,8 +86,8 @@ start(){
# 运行前检查 # 运行前检查
run_check run_check
# 获取用户传递的第二个参数 # 获取用户传递的第二个参数
service=$2 service=$1
echo $service
# 如果service为空,或者为all,则运行所有服务 # 如果service为空,或者为all,则运行所有服务
if [ "${service}" = "" ] || [ "${service}" = "all" ] if [ "${service}" = "" ] || [ "${service}" = "all" ]
then then
@ -141,8 +141,8 @@ stop(){
# 运行前检查 # 运行前检查
run_check run_check
# 获取用户传递的第二个参数 # 获取用户传递的第二个参数
service=$2 service=$1
echo $service
# 如果service为空,或者为all,则停止所有服务 # 如果service为空,或者为all,则停止所有服务
if [ "${service}" = "" ] || [ "${service}" = "all" ] if [ "${service}" = "" ] || [ "${service}" = "all" ]
then then
@ -194,10 +194,10 @@ case $1 in
init init
;; ;;
'start') 'start')
start start ${2}
;; ;;
'stop') 'stop')
stop stop ${2}
;; ;;
*) *)
echo "Usage: $0 {init|run|stop}" echo "Usage: $0 {init|run|stop}"

4
nginx/conf/nginx.conf

@ -1,4 +1,4 @@
user root; # user root;
worker_processes auto; worker_processes auto;
worker_rlimit_nofile 50000; worker_rlimit_nofile 50000;
error_log /usr/local/nginx/logs/error.log; error_log /usr/local/nginx/logs/error.log;
@ -100,7 +100,7 @@ http {
root /var/www/html/default; root /var/www/html/default;
index index.php index.html index.htm; index index.php index.html index.htm;
# PHP 配置 # PHP 配置
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {
include fastcgi_params; include fastcgi_params;

Loading…
Cancel
Save