2025-05-14 22:27:26 +08:00
|
|
|
# Example
|
|
|
|
|
|
|
|
|
|
下载配置
|
|
|
|
|
|
|
|
|
|
```bash
|
2025-06-01 21:06:21 +08:00
|
|
|
curl -fsSL https://i.sugarscat.cn/me/script/-/raw/main/nginx/example/nginx.conf > /etc/nginx/sites-available/example.com
|
2025-05-14 22:27:26 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
启用配置
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
修改配置
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
vim /etc/nginx/sites-available/example.com
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
测试配置
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
nginx -t
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
重启 nginx
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
systemctl restart nginx
|
|
|
|
|
```
|