Nginx
nginx是高性能HTTP服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器。它具有并发处理能力强、内存占用少、运行稳定等特点,并支持跨平台运行,如Linux和Windows。
它能够运行静态网页,包括本博客就是用Nginx运行的。
image-20251020111026989
安装地址:
https://nginx.org/en/download.html
解压后双击Nginx.exe启动
image-20251020111725464
html文件夹下放html文件,就可以展示对应界面。
本地预览地址是http://localhost:80/(html文件名)
配置
配置文件在/nginx/conf/nginx.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
|
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 html; index index.html index.htm; }
error_page 500 502 503 504 /50x.html; location = /50x.html { root html; }
}
}
NGINX
|