PHP 无法通过 ssl 连接运行
我刚刚拿到 ssl 证书,第一次可以工作。 由于某种原因,当我使用 https 连接到我的网站时,我的浏览器尝试下载 php 文件。
我的 httpd.conf 中有以下行。这不是确保 php 文件使用 php 运行的行吗?
AddType application/x-httpd-php .php
我还需要更改什么才能让 php 文件通过 https 连接工作。
谢谢!
更新:
httpd.conf:
已删除...
I just got my ssl certificate to work for the first time.
For some reason when I connect to my website using https my browser tries to download the php file.
I have the following line in my httpd.conf. Isn't this the line which makes sure php files are run using php?
AddType application/x-httpd-php .php
What else do I need to change so that I can get the php files to work over the https connection.
Thanks!
UPDATE:
httpd.conf:
Removed...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题出在 Plesk 上。该专用服务器预装了 Plesk。到目前为止我从未使用过它,但事实证明它以某种方式覆盖了我的 ssl.conf 。
所以解决方案是在 plesk 下创建我的域。将所有文件移至 plesk 创建的新目录。将我的 ssl 证书嵌入到 plesk 并将证书与域相关联。
现在它就像魅力一样发挥作用。我不能说我很高兴我必须开始学习 Plesk,但至少它正在发挥作用。
The problem was somehow with Plesk. This dedicated server came with plesk pre-installed. I never used it so far but it turns out it was overriding my ssl.conf somehow.
So the solution was creating my domain under plesk. Moving all files to the new directory created by plesk. Embedding my ssl certificate to plesk and associating the certificate with the domain.
Now it is working like a charm. I cannot say I'm happy that I have to start learning Plesk but at least it is working.