Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot jhipster ssl ubuntu apache2安装程序_Spring Boot_Ssl_Apache2_Ubuntu 16.04_Jhipster - Fatal编程技术网

Spring boot jhipster ssl ubuntu apache2安装程序

Spring boot jhipster ssl ubuntu apache2安装程序,spring-boot,ssl,apache2,ubuntu-16.04,jhipster,Spring Boot,Ssl,Apache2,Ubuntu 16.04,Jhipster,我已经使用Jhipster生成了我的应用程序。将其配置为在AmazonEC2上运行,使用Ubuntu 16.x和apache,并使用以下配置和godaddy记录。当我点击网站url时,它映射并呈现网站,没有任何问题 apache2配置 <VirtualHost *:80> ServerName 111.22.33.444 ProxyPreserveHost On ProxyRequests Off <Proxy *> Or

我已经使用Jhipster生成了我的应用程序。将其配置为在AmazonEC2上运行,使用Ubuntu 16.x和apache,并使用以下配置和godaddy记录。当我点击网站url时,它映射并呈现网站,没有任何问题

apache2配置

<VirtualHost *:80>
    ServerName 111.22.33.444
    ProxyPreserveHost On
    ProxyRequests Off

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyPass / http://111.22.33.444:8080/
    ProxyPassReverse / http://111.22.33.444:8080/

</VirtualHost>
它没有说

未能重定向到domain.com

无法为domain.com设置增强重定向

它不起作用

我需要对Jhipster应用程序做哪些更改?它应该在443上运行还是继续运行8080并更新虚拟主机配置?我应该如何配置虚拟主机


我到处找,没有指示。非常感谢您的指导。

假设您的应用程序在上可用,您可以通过以下步骤使用Certbot成功配置Apache for HTTPS

安装服务器时使用:

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-apache apache2
从配置开始:

<VirtualHost *:80>
        ServerName example.com
        ServerAlias example.com

        ProxyPass / http://127.0.0.1:8080/
        ProxyPassReverse / http://127.0.0.1:8080/

        ProxyPreserveHost On
        ProxyRequests Off

</VirtualHost>
然后使用以下命令运行certbot:


之后,您的应用程序将可以通过HTTPS在您配置和服务的域中访问。

您是否尝试过不带--redirect参数的let encrypt?我猜它会失败,因为您没有在现有虚拟主机中声明任何主机(或者您删除了它们?)。您的设置看起来正确(http请求->apache->jhipster应用)@JonRuddell谢谢您的回复。您是对的,我没有在虚拟主机中声明任何主机。我尝试了不同的组合,包括没有运气的lets encrypt。即使lets encrypt给出错误消息,它也会更新443的虚拟主机条目。我的问题是,我可以在8080上运行应用程序,并且仍然配置HTTPS吗?如果是这样,apache的配置应该是什么?
<VirtualHost *:80>
        ServerName example.com
        ServerAlias example.com

        ProxyPass / http://127.0.0.1:8080/
        ProxyPassReverse / http://127.0.0.1:8080/

        ProxyPreserveHost On
        ProxyRequests Off

</VirtualHost>
a2enmod headers proxy proxy_http
service apache2 restart
sudo certbot --apache -d example.com