# 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运行后,对端口地址访问终于正常了
以上就是本文的全部内容,希望对大家的学习有所帮助。 |