CakePHP和SSL [英] CakePHP and SSL

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

问题描述

我刚刚在我的网站上使用CakePHP安装了一个SSL证书,现在网站不再从webroot加载任何文件(图像,css文件)。有任何想法吗?我认为SSL安装会影响mod_rewrite,或类似这样的。

I just installed a SSL certificate on my website that uses CakePHP and now the site doesn't load anymore files from webroot (images, css files). Any ideas? I think SSL installation affected mod_rewrite, or something like this.

推荐答案

检查您的网站配置是否为apache2。请确保:

I just ran into this problem. Check your sites configuration for apache2. Make sure:

全部允许覆盖

设置为允许.htaccess在ssl下覆盖。这是我的配置文件(在ubuntu上)。

is set to allow .htaccess overrides under ssl. Here is my snippet of my config (on ubuntu).

<IfModule mod_ssl.c>
<VirtualHost _default_:443>
    ServerAdmin webmaster@localhost

DocumentRoot /var/www
<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>
<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
</Directory>

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

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