nginx docker容器 访问不到界面
version: '3'
services:
nginx:
image: nginx:latest
container_name: mn # 启动的实例名称
ports:
- 80:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./logs:/var/log/nginx
worker_processes 1;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
server {
listen 80;
server_name 192.168.245.128;
location / {
root /root/guazai/front/dist;
index index.html index.htm;
}
}
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
访问不到/root/guazai/front/dist/index.html文件,Docker-Compose文件配置错了吗,还是ngixn的配置错了呀?