1. 程式人生 > 其它 >nginx啟動、關閉命令和上傳檔案大小and代理埠號配置

nginx啟動、關閉命令和上傳檔案大小and代理埠號配置

技術標籤:nginx

**

nginx的啟動和關閉

**
start nginx 啟動
nginx -s stop 快速關閉
nginx -s quit 正常關閉
nginx -s reload 重新載入配置檔案

**

nginx配置上傳檔案大小限制

**
在配置檔案中找到http{},新增client_max_body_size 1024m;
在這裡插入圖片描述
**

nginx配置代理埠號

在配置檔案中配置
**

http {
    include       mime.types;
    default_type  application/octet-stream;
	client_max_body_size 1024m;
.......
	server {
        listen       9001;
        server_name  localhost;

        location ~ /eduService/ {
			proxy_pass http://localhost:8001;
		}
		location ~ /eduoss/ {
			proxy_pass http://localhost:8002;
		}
		location ~ /eduvod/ {
			proxy_pass http://localhost:8003;
		}
	}
}