1.安装docker 安装nginx
在docker-compose.yml里面配置nginx外部端口内部端口和地址映射
nginx:
image: nginx:latest
privileged: true
restart: unless-stopped
container_name: nginx-open
ports:
- 外部端口:内部端口(例如8888:8888)
- 外部端口:内部端口(例如9999:9999)
volumes:
- $PWD/nginx:/etc/nginx
extra_hosts:
- “www.xxx.com:192.168.x.x”
xx-ditu:
container_name: xx-ditu
image: nginx
ports:
- “9198:9198”
volumes:
- ./ditu:/usr/xx/xx/ditu
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/logs:/var/log/nginx
- ./nginx/conf.d:/etc/nginx/conf.d
-
2.nginx相当于tomcat功能
在naginx.conf配置内部端口
upstream mapimg{
server localhost:端口号 weight=1;
}
3.配置ditu服务端口
server {
listen 端口号;
server_name localhost;
index index.html index.htm index.php;
root /usr/local/xxx/ditu/;
try_files $uri $uri/ /index.html;
}
需要最新高清卫星地图请联系微信号 w583113531
最高可到20级 包括自定义瓦片地图