in the production environment of the local Vue project, I stored the fake data in the root directory static/mock and configured proxyTable
in the production environment of the local Vue project, I stored the fake data in the root directory static/mock and configured proxyTable
change the localhost in localhost / api to ip?
Agent to http://localhost:8080 port, then your port 8080 needs to be up. Usually, using npm run dev, webpack will help us start a port. The default is 8080, but if we use npm run build, it will only package static files for us, not start the port, so at this time, your port 8080 is not open, so it will not be accessible.
you need to rewrite the uri using nginx's rewrite before forwarding the request.
the specific configuration is as follows:
server {
charset utf-8;
listen 8080;
server_name localhost;
root ...
location /api {
rewite ^/api/(.*)$ /$1 break;
proxy_pass http://xxxx:8080'
}
}
in the website built by nuxt.js, a request is sent in the asyncData method on the home page. The interface address is forwarded with nginx. The background log checks the returned data, but the front end does not receive the returned data. The website ca...
Open a web page and report an error: We re sorry but activity-admin-v2 doesn t work properly without JavaScript enabled. Please enable it to continue. what does this mean, is it caused by my misconfiguration of nginx? this is a vue+php project. ...
the front end is packaged through webpack using Vue cli,. After using nginx, it is found that the TTFB of manifest.js needs 6s, and the loading speed is too slow for the first time nginx is configured as follows server { listen 80; serv...
problem description the URL must be https when debugging Mini Program web-view. How to agent https locally. Web development my usual http web page development is to modify the hosts file and proxy the domain name xx.xxx.com to the local 127.0.0.1 ...
vue uses history mode, refresh is always on the home page vue-router uses history mode. The server is configured according to the official website using nginx. Refresh will only return to the entrance . refresh is still on the original page ...
server { listen 80; server_name dudududu.com; location { proxy_pass http: 116.15.116.123:3002 sites home-full ; } } I want to see the http: 116.15.116.123:3002 sites home-full effect, but always return http: 116.15.116.123:...