Apache 2.4与SSL配置-有403禁止



我的apache配置有问题。我只是用Apache2.4和SSL证书设置了一个新的windows服务器,但当我想访问我的https://localhost,我有一个403禁止的错误。

这是我的vhost-myproject.conf

<VirtualHost *:443>
DocumentRoot "D:/www/myproject/public"
SetEnv APPLICATION_ENV "production"
SetEnv ZF2_PATH D:/zend/ZendFramework-2.4.13/library
ServerName myproject.fr
<Directory "D:/www/myproject/public">
Options +ExecCGI +FollowSymLinks
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
SSLEngine on
SSLCertificateFile "D:/mycertificate.crt"
SSLCertificateKeyFile "D:/mykey.key"
</VirtualHost>

这是我的.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]

</IfModule>

我的主机

127.0.0.1       localhost myprojet.fr
ip_server       myprojet.fr localhost

谢谢你的帮助。

检查httpd.conf文件,并确保参数"Listen"one_answers"ServerName"的配置类似于"Listen 80"one_answers"%ServerName localhost:80"。

相关内容

最新更新