apache - Apache 无法识别域 - Spring App
问题描述
当我只输入域时,它会将我重定向到https://example.net,这很好,但我收到此错误:
页面未正确重定向
我在 error.log 中没有任何错误:(
这是来自 000-default.conf 的代码:
<VirtualHost *:80>
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
Redirect permanent / https://example.net/
ServerName www.example.net
</VirtualHost>
Listen 443
NameVirtualHost *:443
<VirtualHost *:443>
SSLEngine On
SSLProxyEngine On
SSLCertificateKeyFile /etc/apache2/ssl/file1.key
SSLCertificateChainFile /etc/apache2/ssl/file2.ca-bundle
SSLCertificateFile /etc/apache2/ssl/file3.crt
ProxyPreserveHost on
RequestHeader set X-Forwarded-Proto https
RequestHeader set X-Forwarded-Port 443
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
ServerName www.example.net
ServerAlias example.net
</VirtualHost>
解决方案
推荐阅读
- makefile - 让 Make 自动检测协议缓冲区的变化
- linux - 使用命令作为结束索引 valrible 运行 for 循环
- javascript - 在不同的计算机上无法识别新行
- ruby - 使这个 ruby 算法更快
- java - 将 Visual Studio Code 与 Titanum 一起使用时出现“未安装 JDK(Java 开发工具包)”
- xamarin - Picker,数据绑定,再一次有感觉
- linux - 如何在 Bash 脚本中传递参数?
- c++ - 如何将 int4 数组复制到 int8 向量中
- c - BMI的C程序
- javascript - 使用denon时如何避免权限问题