We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
什么是反向代理呢,维基百科里原话是这么说的“反向代理是代理服务器的一种。它根据客户端的请求,从后端的服务器(如Web服务器)上获取资源,然后再将这些资源返回给客户端”
而正向代理相反,典型用途是为在防火墙内的局域网客户端提供访问Internet的途径。
server { listen 80; server_name localhost; location / { proxy_pass http://localhost:8080; proxy_set_header Host $host:$server_port; } }
然后执行命令nginx -s reload 使配置生效。
nginx -s reload
这是访问 localhost 实质上回返回 localhost:8080 内容,当然为了看效果,最好本地搭建 localhost:8080 的站点。
--完--
The text was updated successfully, but these errors were encountered:
No branches or pull requests
前言
什么是反向代理呢,维基百科里原话是这么说的“反向代理是代理服务器的一种。它根据客户端的请求,从后端的服务器(如Web服务器)上获取资源,然后再将这些资源返回给客户端”
配置
然后执行命令
nginx -s reload
使配置生效。这是访问 localhost 实质上回返回 localhost:8080 内容,当然为了看效果,最好本地搭建 localhost:8080 的站点。
--完--
The text was updated successfully, but these errors were encountered: