当前位置:首页 > nginx > 正文

nginx的配置文件是哪个(nginx配置前端文件在哪)

  • nginx
  • 2024-03-16 01:04:02
  • 5828
### nginx配置文件
名称:nginx.conf
路径:
Linux:/etc/nginx/nginx.conf
Windows:C:\nginx\conf\nginx.conf
重要要素:

user user_name group_name;
指定运行nginx进程的用户和用户组。


worker_processes number;
指定nginx要启动的工作进程数。


error_log log_path;
指定nginx错误日志的路径。


events {
worker_connections number;
}
配置nginx的事件处理设置。


http {
server {
listen ip_address:port;
server_name domain_name;
location / {
root document_root;
index index.html index.htm;
}
}
}
管理用于处理HTTP请求的nginx服务器配置。