新文件apache 2.4:403禁止

时间:2016-05-30 12:31:34

标签: apache authorization

我尝试使用Apache 2.4.10访问我的新服务器 不幸的是,我遇到了“403 Forbidden。您无权访问/在此服务器上。”页面。 我试图调整2.4的规则(来自我在2.2中的旧文件)

站点可用的

000-default.conf

#Configuration module SCGI to sync rTorrent / Rutorrent
SCGIMount /RPC2 127.0.0.1:5000
ServerName http://Adress_Server_Lalie/

#Redirection http > https
<VirtualHost Adress_Server_Lalie:80>
        ServerAdmin admin@kim.sufi
        DocumentRoot /var/www/
        ServerName http://Adress_Server_Lalie/
        Redirect permanent / https://Adress_Server_Lalie/
</VirtualHost>

#SSL
<IfModule mod_ssl.c>
<VirtualHost Adress_Server_Lalie:443>

        ServerAdmin admin@kim.sufi
        DocumentRoot /var/www
        ServerName https://Adress_Server_Lalie

        <Directory />
                Options FollowSymLinks
                Require all granted
        </Directory>

        <Directory /var/www/>
                Options FollowSymLinks ExecCGI
                AllowOverride All
                Require all granted
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Require all granted
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined

        #   Enable/Disable SSL for this virtual host.
        SSLEngine on
                SSLCertificateFile /etc/ssl/certs/server.crt
                SSLCertificateKeyFile /etc/ssl/certs/server.key

        <FilesMatch "\.(cgi|shtml|phtml|php)$">
                SSLOptions +StdEnvVars
        </FilesMatch>
        <Directory /usr/lib/cgi-bin>
                SSLOptions +StdEnvVars
        </Directory>
        BrowserMatch "MSIE [2-6]"                 nokeepalive ssl-unclean-shutdown                 downgrade-1.0 force-response-1.0
        # MSIE 7 and newer should be able to use keepalive
        BrowserMatch "MSIE [7-9]" ssl-unclean-shutdown
        <Directory /var/www>
                Options All
                AllowOverride All
                AuthName "Private"
                AuthType Basic
                AuthUserFile /etc/apache2/.htpasswd
                Require user lalie
        </Directory>
        <Directory /var/www/downloads>
                Options All
                AllowOverride All
                AuthName "Private"
                AuthType Basic
                AuthUserFile /etc/apache2/.htpasswd
                Require user lalie
        </Directory>
</VirtualHost>
</IfModule>
DirectoryIndex  index.html  index.php  /_h5ai/server/php/index.php
你能帮帮我吗? 谢谢你:)。

0 个答案:

没有答案