在部署v2**y-agent的vps上用nginx反向代理

自带的ssl证书 /etc/v2ray-agent/tls

server {
    listen 80;
    listen 127.0.0.1:31300;    #ssl配置,端口照抄/etc/nginx/conf.d/alone.conf
    server_name blog.vatebur.cn;   # 这里指定域名
    #return 302 https://ttk.vatebur.com${request_uri};  #http重定向到https

#PROXY-START/ 参照宝塔
location ^~/img/ {                              #图片资源反向代理
        rewrite ^/(.*)$ /$1 break;
        proxy_pass http://localhost:8090;
        
 }


location ^~ /
{
    proxy_pass http://localhost:8090;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;

    add_header X-Cache $upstream_cache_status;

    #Set Nginx Cache
    

    
    set $static_fileglT33aei 0;
    if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
    {
    	set $static_fileglT33aei 1;
    	expires 12h;
        }
    if ( $static_fileglT33aei = 0 )
    {
    add_header Cache-Control no-cache;
    }
}


#PROXY-END/


}