Mamp Pro 4 HTTP和HTTPS [英] Mamp Pro 4 HTTP and HTTPS

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

问题描述

Mamp Pro 4 中是否不可能同时拥有http和https?我正在处理的应用程序都需要两个页面.

Is it not possible in Mamp Pro 4 to have both http and https? The application I am working on requires both depending on the page.

我必须丢失一些东西,因为当我启用SSL时,只有https起作用,然后http停止起作用,这没有意义.

I must be missing something as it makes no sense when I enable SSL only https works and http then stops working.

我尝试浏览http.conf,但实际上不知道是什么原因造成的.

I tried going through the http.conf, but really have no idea whats causing this.

我认为它只为https生成虚拟主机,然后删除http.甚至看起来您都无法手动对其进行编辑.

I think it just generates the vhost for https only and then removes http. Doesn't even look like you can manually edit it.

任何建议都会很棒.

推荐答案

如果有其他人有此问题,可以更新我自己的帖子.

Well to update my own post and if anyone else has this problem.

该软件当前无法在同一主机名上执行此操作.

The software is currently not capable of this on the same hostname.

根据Mamp支持,您必须创建两个具有相同名称的主机(例如sample.app和sample.app.).

According to Mamp support you have to create two hosts with the same name (e.g. sample.app and sample.app.).

  1. 启用"sample.app"主机名之一以使用SSL
  2. 启用第二个主机条目"sample.app"以不使用SSL. (不要忘记在单击+时按住Alt或Option)
  3. 将它们都指向同一目录.

Mamp将以红色突出显示,因为它警告您拥有两个相同的主机名.

Mamp will highlight this in red, as its warning that you have two of the same hostnames.

因此,这是目前我所知道的唯一解决方案.

So currently this is the only solution I am aware of for this issue.

希望他们在将来的更新中解决此问题,因为许多应用程序,尤其是电子商务依赖于在http和https之间切换的功能.

Hope they resolve this in future updates as a lot of applications, especially ecommerce rely on the ability to switch between http and https.

您可以在Mamp Pro文档中此处.

You can see this on the Mamp Pro documentation here.

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

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