This commit is contained in:
xking 2025-03-21 15:35:41 +08:00
parent 997d8a0ac9
commit 86542c0689
Signed by: chenkuangwei
GPG Key ID: 931C79A9747F5F82

View File

@ -4,7 +4,7 @@
##### 安装编译环境 ##### 安装编译环境
``` ```bash
#GCC #GCC
apt install -y build-essential apt install -y build-essential
@ -59,7 +59,7 @@ https://nginx.org/download/nginx-1.22.0.tar.gz
``` ```bash
./configure \ ./configure \
--prefix=/usr/local/nginx \ --prefix=/usr/local/nginx \
--user=www \ --user=www \
@ -170,7 +170,7 @@ curl 127.0.0.1
加到 http 节点中 加到 http 节点中
``` ```nginx
include mime.types; include mime.types;
default_type application/octet-stream; default_type application/octet-stream;
@ -261,7 +261,7 @@ curl 127.0.0.1
#### 附1 `systemctl 操作` #### 附1 `systemctl 操作`
``` ```bash
#重载配置文件 添加新的 或者修改都要重载。 #重载配置文件 添加新的 或者修改都要重载。
systemctl daemon-reload systemctl daemon-reload
@ -334,7 +334,7 @@ curl 127.0.0.1
apt 卸载nginx apt 卸载nginx
``` ```bash
查询 nginx 相关软件 查询 nginx 相关软件
dpkg --get-selections|grep nginx dpkg --get-selections|grep nginx
@ -352,7 +352,6 @@ apt-get --purge remove nginx
###### nginx.conf ###### nginx.conf
```nginx ```nginx
worker_processes auto; worker_processes auto;
worker_rlimit_nofile 51200; worker_rlimit_nofile 51200;
@ -415,7 +414,6 @@ http {
server_tokens off; server_tokens off;
access_log off; access_log off;
include /etc/nginx/site-enable/*.conf; include /etc/nginx/site-enable/*.conf;
} }
@ -425,7 +423,7 @@ http {
###### web-site.conf ###### web-site.conf
``` ```nginx
server { server {
listen 80; listen 80;
server_name frp.plugin.dr1997.com; server_name frp.plugin.dr1997.com;
@ -450,7 +448,7 @@ server {
###### ssl ###### ssl
``` ```nginx
server { server {
listen 80; listen 80;
listen 443 ssl http2; listen 443 ssl http2;
@ -490,7 +488,7 @@ server {
###### 反向代理http ###### 反向代理http
``` ```nginx
server { server {
listen 80; listen 80;
listen 443 ssl http2; listen 443 ssl http2;
@ -533,7 +531,7 @@ server {
###### 反向代理 tcn ###### 反向代理 tcn
``` ```nginx
upstream tcp { upstream tcp {
server 127.0.0.1:3306; server 127.0.0.1:3306;
} }