0

I have deployed my Flutter web build (/build/ folder) to the following location on my RHEL 9.5 server running Apache:

/var/www/html/flweb/ I am trying to access my Flutter web app using: http:///flweb/ However, I am getting the following error in the browser console: flutter_bootstrap.js:1 Uncaught SyntaxError: Unexpected token '<'

Steps Taken:

  1. Checked Apache Configurations: Ensured that Apache is running and serving files correctly, it serves basic index.html with Hello World correctly.
  2. File Permissions: Set appropriate permissions for the /var/www/html/flweb/ directory.
  3. Checked Network Access: The server is accessible over HTTP.
  4. Checked Console Logs: The error suggests that flutter_bootstrap.js is not loading properly.

Questions:

  1. Has anyone encountered this issue when deploying Flutter web on Apache?
  2. Are there any specific Apache configurations needed for serving Flutter web apps?

Any help would be appreciated. Thanks!

asked Mar 4, 2025 at 5:49

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.