The picture
code
Location / {root C:/Users/JOKE/Desktop/ new folder /cs; index bb.html bb.htm; #try_files $uri $uri/ /index.html; Configuration vue history model open} the location/API / {proxy_pass http://jyx.local.yzbtkj.cn/; #proxy_set_header: Host $host; }Copy the code
Detailed code
http { server { server_name localhost; {alias D:/yizun/ SRC /site; // The address of the local code index index.html index.htm; try_files $uri $uri/ /index.html =404; } location /vipAdsl/ {// forward the request starting with /vipAdsl/ to the corresponding server proxy_pass http://112.124.194.36/; Proxy_cookie_path /vipAdsl/ /; proxy_cookie_path /vipAdsl /; proxy_set_header Cookie $http_cookie; }}}Copy the code
Nginx command
Start nginx // start nginx -s reload // reload nginx -s stop // close or start via nginx.extCopy the code