Commit c452c334 by ChongmingDu

Update 服务端口转发.md

parent 8d7459d2
1. 找到nginx配置文件目录
1. 找到nginx配置文件目录
......@@ -2,16 +2,14 @@
2. 在配置文件目录下生成一个文件,写入如下内容:
```
server {
listen 80;
server_name 转发到哪个地址;
access_log 日志位置 main;
error_log 错误日志位置 ;
stream {
server {
listen 3000;
proxy_pass 127.0.0.1:3306;
location / {
proxy_pass http://代理到那个位置;
}
# 也支持socket
# proxy_pass unix:/var/lib/mysql/mysql.socket;
}
error_page 500 502 503 504 /50x.html;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment