0%

nginx百宝箱

ubuntu nginx 服务取消开机启动:

1
update-rc.d -f nginx remove

nginx 服务开启开机启动:

1
update-rc.d –f nginx defaults

nginx 服务启动\重启\停止:

1
sudo /etc/init.d/nginx start\restart\stop

nginx 服务器开启自启动

1
systemctl enable nginx

nginx 命令

1
2
3
4
systemctl start nginx.service
systemctl stop nginx.service
systemctl reload nginx.service
systemctl status nginx.service

反向代理

1
2
3
4
5
6
7
location /v1/ai/{
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header HOST $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:9030;
proxy_redirect off;
}