- Nginx官网:http://nginx.org/ 点击 download 选择要下载的版本
- 解压Nginx压缩包
- 启动:打开cmd命令窗口,然后切换到nginx目录下,输入命令 nginx.exe 或者 start nginx 回车
这就安装好啦 - 打开conf文件夹的nginx.conf文件,Nginx服务器的基础配置,默认的配置也存放在此
在 nginx.conf 的注释符号为: #
默认的 nginx 配置文件 nginx.conf 内容如下:#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include 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 logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepaliv
Windows安装Nginx
最新推荐文章于 2023-03-22 08:27:29 发布