2

When I execute my Blazor app on localhost everything is fine. When I upload the compiled code to my final server, the app works but all CSS/JS are missing. I use Centos 7 + Apache in reverse proxy mode. My CNF:

<VirtualHost *:*>
    RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
</VirtualHost>


<VirtualHost *:80>
# Your domain name
ServerName 192.168.5.69

ProxyPreserveHost On

# The IP and port of the JBoss Enterprise Application Platform
# These represent the default values, if your HTTPD is on the same host
# as your JBoss Enterprise Application Platform managed domain or server

ProxyPass / http://localhost:5000/
ProxyPassReverse / http://localhost:5000/

# The location of the HTML files, and access control information
DocumentRoot /var/www/html

RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
RewriteRule /(.*) ws://127.0.0.1:5000/$1 [P]

<Directory /var/www/html>
Options -Indexes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

On Chrome console I see:

Siti:12 GET http://192.168.5.69/js/JavaScriptInterop.js net::ERR_ABORTED 404 (Not Found)
Siti:11 GET http://192.168.5.69/css/site.css net::ERR_ABORTED 404 (Not Found)
Siti:10 GET http://192.168.5.69/css/font-awesome/font-awesome.min.css net::ERR_ABORTED 404 (Not Found)```
marco3189
  • 31
  • 4

0 Answers0