nginx配置本地服务-如图片服务器

修改配置Conf下的nginx配置

nginx配置本地服务-如图片服务器

nginx配置本地服务-如图片服务器

配置文件如下

 server {
    listen 9111 reuseport;
    # server_name  localhost;
    location / {
      allow all;
      deny all;
      set $upstream_mirror_host        '';
      set $upstream_scheme             'http';
      set $upstream_host               $host;
      set $upstream_upgrade            '';
      set $upstream_connection         '';
      set $upstream_uri                '';
      proxy_http_version 1.1;
      proxy_set_header   Host              $upstream_host;
      proxy_set_header   Upgrade           $upstream_upgrade;
      proxy_set_header   Connection        $upstream_connection;
      proxy_set_header   X-Real-IP         $remote_addr;
      proxy_pass_header  Server;
      proxy_pass_header  Date;
      root   /opt/tar/website/;
      index  ./index.html  index.htm;
    }
}

 

上一篇:nginx 代理上网配置


下一篇:(15)Docker之用Nginx实现SpringBoot应用的负载均衡简单记录