html - 缺少使用 apache mod_proxy 的 Doctype HTML 部署

标签 html apache tomcat doctype mod-proxy

我有一个奇怪的问题...

我的 Vaadin 应用程序在我的计算机(本地)上运行良好。我刚刚部署了网站,现在遇到问题:

<!Doctype html>第一行中的标记丢失。我不知道为什么会这样,但我认为这会导致一些问题,因为该网站正在以 Quirks 模式显示。

有趣的是,当我在本地运行应用程序时,设置了 doctype 标签。

我只是将应用程序导出到一个 war 文件并进行了部署。

到目前为止,我还没有在 Internet 上找到任何解决方案...

这是 Tomcat 设置问题还是其他问题?

最佳答案

已经找到问题了!

我使用 Apache mod_proxy 来处理我的网络应用程序。 proxy_html.conf 中未设置 html 文档类型。我只需在 proxy_html.conf 中将 ProxyHTMLDocType 定义为 HTML 5。

proxy_html.conf:

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

有关更多信息,请参阅:

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

关于html - 缺少使用 apache mod_proxy 的 Doctype HTML 部署,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15642412/

相关文章:

eclipse - Apache Tomcat 或 Eclipse 重定向到本地主机 :8080/instead of localhost:8080/projectname/index. jsp

javascript - 如何从 input=File 更改 javascript 中的文件名

javascript - 如何在 JavaScript 中创建切换函数以在 HTML 中显示 div?

php - 使用 SSL 在负载均衡器后面的 PHP 中重定向循环

java.lang.NoClassDefFoundError : Could not initialize class org. apache.jmeter.gui.util.MenuFactory

tomcat - 反向代理 lighttpd https 不工作

jsp - 使用三元运算符的数学公式会导致错误

html - 为什么div在for循环完成之前不更新?

html - 如何强制位置为 :absolute to resize the parent div? 的元素

apache - 在 Apache 中创建 IP 虚拟主机