得知互动

标题: docker nginx 运行后无法访问的问题解决 [打印本页]

作者: Elinkcloud    时间: 2022-4-11 10:50
标题: docker nginx 运行后无法访问的问题解决
# 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"';  access_log /var/log/nginx/access.log main;  sendfile    on;  #tcp_nopush   on;  keepalive_timeout 65;  #gzip on;  include /etc/nginx/conf.d/*.conf;}version: '3'services: nginx-proxy:  image: nginx  container_name: nginx  ports:   - 8081:80  volumes:   - ./nginx/nginx.conf:/etc/nginx/nginx.conf:rodocker exec -it nginx /bin/bash-./nginx/sites-available:/etc/nginx/sites-available:ro/etc/nginx/sites-available# lsdefault.conf运行后,对端口地址访问终于正常了

以上就是本文的全部内容,希望对大家的学习有所帮助。




欢迎光临 得知互动 (https://bbs.dezhifl.com/) Powered by Discuz! X3.4