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:
- Checked Apache Configurations: Ensured that Apache is running and serving files correctly, it serves basic index.html with Hello World correctly.
- File Permissions: Set appropriate permissions for the /var/www/html/flweb/ directory.
- Checked Network Access: The server is accessible over HTTP.
- Checked Console Logs: The error suggests that flutter_bootstrap.js is not loading properly.
Questions:
- Has anyone encountered this issue when deploying Flutter web on Apache?
- Are there any specific Apache configurations needed for serving Flutter web apps?
Any help would be appreciated. Thanks!