背景:
最近在做小程序的开发遇到一个问题,在同一个域名下需要ISS和Tomcat服务器共存,IIS下部署由C#编写的A小程序接口,Tomcat下部署着由Java实现的B小程序接口,因为微信小程序要求必须通过HTTPS请求完成与服务端通信,所以都需要访问443端口;
环境:
windows server 2019
IIS6服务器
Tomcat8服务器
Nginx1.10.3
步骤:
首先确保tomcat和IIS两个服务器可单独运行。
1、修改IIS的所有网站项目的端口,设为80(端口号可自行设置,只要保证不与tomcat端口冲突就行);
2、设置tomcat的配置文件:server.xml,如下:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. Y