Openresty学习(七):Nginx基础配置及命令行,openrestynginx



1. nginx 配置

daemon on|off; 是否以守护进程方式运行worker_rlimit_core 10000m;coredump大小限制 
working_directory /tmp; //coredump 目录、
worker_processes  1; //工作线程数量
master_process off;是否以master-work方式运行


2.nginx命令行 

  • nginx启动:nginx -c /usr/local/nginx/conf/nginx.conf
  • 版本查看: ./sbin/nginx -v
       nginx version: openresty/1.13.6.1
  • 配置文件测试: nginx -t -c nginx.conf
       nginx: the configuration file /usr/local/openresty/nginx/conf/nginx.conf syntax is ok
       nginx: configuration file /usr/local/openresty/nginx/conf/nginx.conf test is successful
  • 快速停止服务:nginx -s stop
  • 优雅停止服务:nginx -s quit
  • 重新读配置项并生效:nginx -s reload
  • 重新打开日志文件:nginx -s reopen
  • 平滑升级:nginx -ss SIGUSR2



相关内容

    暂无相关文章