Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
QA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mayi-operation
QA
Commits
c452c334
Commit
c452c334
authored
Mar 04, 2019
by
ChongmingDu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 服务端口转发.md
parent
8d7459d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
服务端口转发.md
+8
-10
No files found.
服务端口转发.md
View file @
c452c334
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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment