摘要: 例: location ^~ /api/ { rewrite ^/api/(.*)$ /$1 break; proxy_pass http://localhost:8080; } ^:匹配输入字符串的起始位置$:匹配输入字符串的结束位置 location ^~:表示普通字符匹配。使用前缀匹配。如果匹 阅读全文
posted @ 2025-08-23 15:28 休玛 阅读(82) 评论(0) 推荐(0)
摘要: netstat -luntp 命令用于在 Linux 系统中显示网络连接、监听端口、进程信息等详细信息,各选项含义如下: 选项说明 ‌-l‌:仅显示监听状态的端口(状态为 LISTEN)。 ‌-n‌:以数字形式显示地址和端口号(不解析主机名)。 ‌-t‌:仅显示 TCP 连接。 ‌-u‌:仅显示 U 阅读全文
posted @ 2025-08-23 10:44 休玛 阅读(66) 评论(0) 推荐(0)
摘要: 使用系统服务命令启动 启动Nginx:sudo systemctl start nginx 让Nginx在系统启动时自动启动:sudo systemctl enable nginx 使用服务命令启动 sudo service nginx start 使用systemctl命令停止 sudo syst 阅读全文
posted @ 2025-08-23 10:07 休玛 阅读(19) 评论(0) 推荐(0)
摘要: 路径 用途 /etc/nginx/ 这是最重要的目录! 所有配置文件都在这里,包括 nginx.conf 和 sites-available/, sites-enabled/ /usr/share/nginx/html/ 默认的网站根目录,您上传的网页文件(如index.html)通常放在这里 /v 阅读全文
posted @ 2025-08-23 09:55 休玛 阅读(18) 评论(0) 推荐(0)