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