Nginx solves cross-domain configuration problems

vue project wants to use nginx to solve cross-domain problems

I know the reason for the following problem. Now I have a new problem. Nginx listens to port 8080 to transfer locahost:8080/apis to another address, but node is also listening for 8080 conflicts.

configuration:

server {
    listen       8080;
    server_name  localhost;

    -sharpcharset koi8-r;

    -sharpaccess_log  logs/host.access.log  main;
    
    location /apis{
        proxy_pass http://baidu.com;
    }
}

after this configuration, access to http://localhost:8080/apis jumps to http://localhost:8080/apis-sharp/index instead of baidu.com?

May.16,2021

location ~ ^ / apis/ (. ) ${

if ($request_uri ~* ^/apis/(.*)$) {
    rewrite /apis/(.*) /$1 break;
}
proxy_pass http://baidu.com;

}


you said conflict, why not change one of the ports

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eafae9-2271.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eafae9-2271.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?