Nginx服务器中配置非80端口的端口转发方法详解

2017.10.26 nginx

1.下载nginx

http://nginx.org/en/download.html

2.修改conf/nginx.conf配置

server {
	listen       8080; #默认80
	server_name  localhost;

	#charset koi8-r;

	#access_log  logs/host.access.log  main;

	location / {
	    #root   html;
	    #index  index.html index.htm;
	    proxy_pass http://102.99.100.102;
	}
    ......

其中如果要监听8080,将访问本机的8080转发到102上时,可以如上配置,然后启动nginx.exe即可

更新列表:

参考文章:

相关阅读