下载
http://nginx.org/en/download.html
解压
将下载后的 nginx-1.19.8.zip
压缩包解压缩到 D:/applications
目录下。
解压后的目录结构如下:
<img src="images\nginx-directory.png" style="zoom:80%;border:1px solid gray;" />
配置
在 conf
目录中找到 nginx.conf
文件,先备份后再修改该文件。
修改之后的内容如下:
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root D:/mycodes/movable-termination;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root D:/mycodes/mo