docker nginx 运行后无法访问
1 最近在学docker部署,一开始打算将nginx先docker化的。 对照 官方的docker镜像介绍说明 ,进行自定义配置 将官方的nginx.conf复制出来后,修改添加了一些自定义,主要是屏蔽了default.conf,以及include文件夹 sites-available include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-available/*; 官方原先配置 user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';