nginx通过url跳转到另外的一个url上

nginx通过url跳转到另外的一个url上

#user nobody;
worker_processes 1;

events {
worker_connections 1024;
}

http {
sendfile on;
server {
listen 7080;
server_name localhost;

     location ^~ /demo { 
    proxy_pass http://127.0.0.1/;
}
location / {  
    root html;
    index index.html index.htm;
}
}

}