nginx-c,设置配置文件
正在尝试设置配置文件。Ubuntu 14.04.3 LTS。用户根目录nginx-c,设置配置文件,nginx,Nginx,正在尝试设置配置文件。Ubuntu 14.04.3 LTS。用户根目录 nginx -s quit nginx -c /home/webapps/confs/nginx.conf nginx -V …--conf path=/etc/nginx/nginx.conf nginx:配置文件/home/webapps/confs/nginx.conf语法正常 nginx:configuration file/home/webapps/confs/nginx.conf测试为 成功的 …--con
nginx -s quit
nginx -c /home/webapps/confs/nginx.conf
nginx -V
…--conf path=/etc/nginx/nginx.conf
nginx:配置文件/home/webapps/confs/nginx.conf语法正常
nginx:configuration file/home/webapps/confs/nginx.conf测试为
成功的
…--conf path=/etc/nginx/nginx.conf
我做错了什么?您可以使用
-p
选项指定前缀路径:
nginx -p /home/webapps/confs/ -c nginx.conf
据我所知,您无法覆盖配置路径的默认位置,但如果您有意这样做,则需要将其传入。“-V”的调用是独立的实例谢谢。这就是答案。
nginx -V
nginx -p /home/webapps/confs/ -c nginx.conf