Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6125

Nginx no muestra proxi en location / data {} aplicacion en Reactjs Vite [closed]

$
0
0

I have tried to display the path www.domino.com/login_admin , and it shows me a white screen with the following message:

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

bless.

# Definición de upstreamupstream public_front {    server 127.0.0.1:3000;    keepalive 64;}upstream public_admin {    server 127.0.0.1:5173;    keepalive 64;}server {    listen [::]:443 ssl ipv6only=on;    listen 443 ssl;    server_name www.dominio.com;    ssl_certificate /etc/letsencrypt/live/dominio.com/fullchain.pem;    ssl_certificate_key /etc/letsencrypt/live/dominio.com/privkey.pem;    include /etc/letsencrypt/options-ssl-nginx.conf;    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;    location / {        proxy_pass http://public_front/;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;        proxy_set_header X-Real-IP $remote_addr;        proxy_set_header Host $http_host;        proxy_http_version 1.1;        proxy_set_header Upgrade $http_upgrade;        proxy_set_header Connection "upgrade";        proxy_redirect off;        proxy_read_timeout 240s;    }    location /login_admin {        #rewrite ^/login_admin(/.*)?$ / break;        proxy_pass http://public_admin;        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;        proxy_set_header X-Real-IP $remote_addr;        proxy_set_header Host $http_host;        proxy_http_version 1.1;        proxy_set_header Upgrade $http_upgrade;        proxy_set_header Connection "upgrade";        proxy_redirect off;        proxy_read_timeout 240s;    }}```Swap ports in location / { showing the app interface,in location /login_admin it shows white screen with message.Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

Viewing all articles
Browse latest Browse all 6125

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>