一、Nginx安装教程
二、反向***概念解释
三、反向***实例
1. 效果图
- 通过一个内网IP访问到了外网的博客地址
 
2.实现过程
- 修改配置文件
 - 重启nginx/重新加载配置文件
 
部分配置文件:
server {
		# 监听8888端口
        listen       8888;
        # 配置主机地址
        server_name  10.10.72.86;
        location / {
            root   html;
            index  index.html index.htm;
            # 配置***
            proxy_pass https://blog.csdn.net/qq_41113081;
        }
    }
  完整配置文件:
user  nginx;
worker_processes  1;
error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;
events {
    worker_connections  1024;
}
http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
    access_log  /var/log/nginx/access.log  main;
    sendfile        on;
    #tcp_nopush on;
    keepalive_timeout  65;
    #gzip on;
    include /etc/nginx/conf.d/*.conf; server { listen 8888; server_name 10.10.72.86; location / { root html; index index.html index.htm; proxy_pass https://blog.csdn.net/qq_41113081; } } } 
京公网安备 11010502036488号