- 有两个大项目交互必须在一级域名下,每个项目有多个前端,之前采用二级或三级域名的方式导致域名过多不好维护,故由project1.service1.city.com、project1.service2.city.com、project1.service3.city.com的方式,转换为project1.city.com/service1/、project1.city.com/service2/、project1.city.com/service3/
后续域名仅需按项目维护
- 单个前端服务均为docker方式,使用nginx将静态资源转发,docker -p将端口映射出来
- 实现方式
采用nginx反向代理,注意项目内路径的设置问题,本次遇见的问题均有路由错误导致,供参考
server
{
listen 80;
listen 443 ssl http2;
server_name eztest.city.com;
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/eztest.city.com;
add_header Strict-Transport-Security "max-age=31536000";
error_page 497 https://$host$request_uri;
incl