nginx 反向代理到目錄

hikarusun發表於2017-04-01
upstream yg{
    server 127.0.0.x;
}

server {  
    listen      80;  
    server_name  www.hikaru.pw;  
    location / {  
        rewrite ^/(.*)$ /yg/$1 last;  
    }  
  
    location ~* ^/yg/.*$ {  
        proxy_pass http://yg;  
    }  
}

  

 

相關文章