我正在尝试修改 Nginx 配置文件以删除“重写”。
目前,我有这个配置文件:
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name amc.local;
return 301 https://$host:8443/index.html;
}
}
现在我想重新加载这个配置文件,我尝试过
nginx -s reload
nginx -c <conf file>
nginx -s stop/start
在日志文件中,有一行
2014/01/22 11:25:25 [notice] 1310#0: signal process started
但修改未加载。
最佳答案
也许您不是以 root 身份执行此操作?
尝试sudo nginx -s reload
,如果仍然不起作用,您可能需要尝试sudo pkill -HUP nginx
。
关于configuration - 重新加载 Nginx 配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21292533/