首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Apache cert auth不工作。

Apache cert auth不工作。
EN

Stack Overflow用户
提问于 2014-07-18 15:12:16
回答 1查看 74关注 0票数 0

在我的公司中,我已经设置了一个虚拟主机作为Web,并且由于用例,我们已经配置了Django应用程序,它在URL路径中创建了基本的auth。它需要使用cert,因此在apache的一侧,我们在另一个URL上配置了客户端证书验证,但似乎不起作用,apache允许所有流量到达这个URL位置,请求头保持不变,就好像服务器没有请求auth一样。

conf文件如下所示:

代码语言:javascript
复制
<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    WSGIPassAuthorization on
    WSGIScriptAlias / /srv/www/site/site/wsgi.py
    Alias /favicon.ico /srv/www/site/static/img/favicon.ico
    Alias /static/ /srv/www/site/static/
    Header set Access-Control-Allow-Origin http://127.0.0.1:9000

    SSLVerifyClient none
    SSLCACertificateFile ssl.crt/ClientCheck_CA.crt

    DocumentRoot /srv/www/site

    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>

    <Directory /srv/www/site>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    <Location /api-certauth/>
        SSLVerifyClient require
        SSLVerifyDepth 3
        SSLOptions +ExportCertData
    </Location>

    <Directory /srv/www/site/static>
        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>

</VirtualHost>

基本上,当我请求http://server-name.com/api-certauth时,不会像服务器中的任何其他URL一样向浏览器请求auth。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-07-22 15:28:17

解决了我的问题,把端口80改为443

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24828363

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档