Nginx 配置静态网站

Keva
阅读 706
#静态资源多目录发布测试
server {
	listen		80;
	server_name	www.xxx.com;
	root C:/www_html;

	location /pro1 {
		proxy_pass				http://localhost:8080;
		#proxy_set_header  Host			$host;
		#proxy_set_header  X-Real-IP		$remote_addr;
		#proxy_set_header  X-Forwarded-For	$proxy_add_x_forwarded_for;
	}

	location ^~ /star/ {
		try_files $uri /star/index.html;
	}

	location ^~ /mouse_line/ {
		try_files $uri /mouse_line/index.html;
	}
	location ^~ /imagefilters/ {
		try_files $uri /imagefilters/demo.html;
	}
}
回到顶部