为了在测试服务器上进行多种开发语言环境的Web项目演示,采用Nginx这个反向代理服务器。
对外只开放两个端口即可,80和443。
采用域名反向到内部不同的项目中,只要支持HTTP/HTTPS的都可以反向过来。
目前测试过集成IIS、Apache、Tomcat三大流行Web服务器。
在低于Windows 2012的系统下,IIS的443只能一个证书,采用反向代理则可解决这个问题。
官网:
http://nginx.org/en/download.html
Windows版本:
(不建议生产环境中使用,性能比较差。生产还是用Linux比较好,Windows下的Nginx主要用于开发和演示)
http://nginx.org/download/nginx-1.16.0.zip
源码:
http://nginx.org/download/nginx-1.16.0.tar.gz
配置为服务:
https://github.com/kohsuke/winsw/
https://github.com/kohsuke/winsw/releases/tag/winsw-v2.2.0
Your renamed winsw.exe
binary also accepts the following commands:
install
to install the service to Windows Service Controller. This command requires some preliminary steps described in the Installation Guide.uninstall
to uninstall the service. The opposite operation of above.start
to start the service. The service must have already been installed.stop
to stop the service.restart
to restart the service. If the service is not currently running, this command acts like start
.status
to check the current status of the service.
NonExistent
indicates the service is not currently installedStarted
to indicate the service is currently runningStopped
to indicate that the service is installed but not currently running.
Windows 2012 R2 下的 Nginx 1.16 配置
原文:https://www.cnblogs.com/beijingit/p/10918093.html