Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing Doctype HTML Deployment using apache mod_proxy

I have a strange problem...

My Vaadin Application is working fine on my computer (locally). I just deployed the website and now I have a problem:

The <!Doctype html> tag in the first line is missing. I don't know why it is, but I think this is causing some problems, because the Website is being displayed in Quirks mode.

The funny thing is, when I run the application locally, the doctype tag is set.

I simply exported the application to a war file and deployed it.

I haven't found any soloution on the Internet so far...

Is this a Tomcat setting problem or anything else?

like image 220
RAN Avatar asked Jan 13 '23 20:01

RAN


1 Answers

Already found the problem!

I was using Apache mod_proxy to handle my web application. The html doctype was not set in the proxy_html.conf. I simply had to define the ProxyHTMLDocType to HTML 5 in the proxy_html.conf.

proxy_html.conf:

ProxyHTMLDocType "<!DOCTYPE html>" // Sets the Doctype to HTML5

for further information just see:

http://www.xinotes.org/notes/note/762/

like image 78
RAN Avatar answered Jan 19 '23 12:01

RAN