请教关于 nginx 配置问题
来源:10-6 在Docker中部署前端项目

johnny_2008
2023-04-03
老师您好
配置文件,没有配置 server ,为什么在 docker 环境可以正常访问项目呢?
我在 window 使用相同的配置文件 nginx 都无法启动(已修改 include 值)
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
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;
}
写回答
1回答
-
nginx版本不同配置方法也不一样,何况Linux文件路径跟Windows也不同
012023-04-04
相似问题