[Gambas-user] WebPage and external files
benoit.minisini at gambas-basic.org
Sun Nov 20 21:13:03 CET 2022
Le 16/11/2022 à 02:41, T Lee Davidson a écrit :
> [I apologize to the members of this list for the lack of context as the
> other half of this conversation has been sent to me off-list.]
> That particular project works fine with the IDE's embedded http server.
> However, it does not work as expected on either Apache or Lighttpd web
> It appears that the files, linked in the WebPage using
> <%=Application.Root%>, are provided to the server by the Gambas
> executable (eg. the path for style.css in the project's Public directory
> is <Document_Root>/webapp.gambas/style.css).
> This does not work on the web servers, apparently, due to what the
> executable is providing to the server as hinted at by this browser
> console error message:
> The stylesheet http://localhost:8888/~user/webapp.gambas/style.css was
> not loaded because its MIME type, “text/html”, is not “text/css”.
> Indeed, what the server is receiving is the actual HTML of the page
> itself as can be seen by the attached pic.
> I think it is a bug. But, I could be wrong.
There is no support in 'gb.web' to serve the '.public' directory of the
project, but the embedded http server has it!
So when you run the project from the IDE, it works, but when you run the
CGI executable through a web server, it does not!
I don't know what I wanted to do when doing this mess, because if
'gb.web' serves the '.public' directory, there is no need anymore to do
that from the embedded http server...
More information about the User