When using Nginx as a reverse proxy for a Vue UI default link on a Linux server, the page is blank, and you need to specify --host 0.0.0.0
setube opened this issue · 0 comments
Version
5.0.8
Environment info
System:
OS: Linux 4.19 Debian GNU/Linux 10 (buster) 10 (buster)
CPU: (2) x64 Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz
Binaries:
Node: 20.11.1 - /www/server/nodejs/v20.11.1/bin/node
Yarn: 1.22.22 - /www/server/nodejs/v20.11.1/bin/yarn
npm: 10.8.1 - /www/server/nodejs/v20.11.1/bin/npm
Browsers:
Chrome: Not Found
npmGlobalPackages:
@vue/cli: 5.0.8
Steps to reproduce
-
Run the following command on the Linux server to start Vue UI:
vue ui -
Configure Nginx to set up a reverse proxy, mapping
http://localhost:8000to an externally accessible link. -
Access the proxied URL in your browser (e.g.,
http://your-server-ip:8000). -
The page remains blank and fails to load properly.
-
If you start Vue UI with the following command:
vue ui --host 0.0.0.0 -
Then, access
http://0.0.0.0:8000via the Nginx reverse proxy, and the page displays correctly.
What is expected?
It is expected that when opening the Vue UI interface via Nginx reverse proxy, the UI content would load and display correctly without needing to use the --host 0.0.0.0 parameter.
What is actually happening?
In reality, after opening the default link (http://localhost:8000) through Nginx reverse proxy, the page remains blank and stays in a loading state. Only when I use vue ui --host 0.0.0.0 am I able to access the interface properly.