HTTPS 上的 Mojolicious [英] Mojolicious over HTTPS

查看:54
本文介绍了HTTPS 上的 Mojolicious的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 Mojolicious 用于需要加密连接的网络应用程序,但我不知道如何为 Mojolicious 添加 SSL 支持.

I am using Mojolicious for a web app that requires an encrypted connection, but I don't know how to add SSL support to Mojolicious.

我的同事给我发了这些:文件 domain.key、domain-bundle.crt、domain.crt

My coworker sent me these: files domain.key, domain-bundle.crt, domain.crt

我的 Mojolicious 启动看起来像这样:

and my Mojolicious startup looks like this:

sub startup {
my $self = shift;
$self->secrets(['secretphrase']);
$self->config(hypnotoad => {listen => ['http://*:80']});

如何在不使用反向代理的情况下添加 HTTPS 支持

How can I add HTTPS support without having to use a reverse-proxy

推荐答案

找到方法:

sub startup {
my $self = shift;
$self->secrets(['secretphrase']);
$self->config(hypnotoad => {
      listen => ['https://*:443?cert=/etc/tls/domain.crt&key=/etc/tls/domain.key']
  });

这篇关于HTTPS 上的 Mojolicious的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆