nginx常用配置

61 阅读1分钟
// index 文件
server {
	listen 80;
	listen [::]:80;
	server_name test.qixin.fun;
	charset utf-8;

	location / {
		root /web/test_qixin_fun;
		index index.html index.htm;
		try_files $uri $uri/ /index.html =404;
	}
}


// node 项目
server {
	listen 80;
	listen [::]:80;
	server_name lgj.qixin.fun;
	
	location / {
		proxy_pass http://127.0.0.1:3002/;
	}
}