Apache 403 и слишком много перенаправлений iRedAdmin & RoundCube

Что-то не так с моей конфигурацией VHost и не позволяет мне подключаться к RoundCube или к панели iRedAdmin. При попытке подключиться к панели iRedAdmin появляется ошибка 403 Forbidden. И я получаю сообщение об ошибке слишком большого количества перенаправлений, пытаясь посетить RoundCube. Я попробовал это на новой установке сервера, и доступ к приложениям работал, но это было без изменения файла apache conf или VHost. iRedMail был первым, что я установил на свежий сервер Ubuntu 16, где у меня возникли эти проблемы.

Нет ошибки при попытке доступа к RoundCube. Попытка получить доступ к панели iRedAdmin приводит к следующей ошибке: Невозможно обслуживать каталог /opt/www/iredadmin/: нет соответствия DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) найдено, и сгенерированный сервером индекс каталога запрещен директивой Options

Вот apache2.conf

#ServerRoot "/etc/apache2"
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}

Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5

User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

HostnameLookups Off

ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn

IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf

ServerAdmin admin@mainelysoftware.com

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all denied
</Directory>

<Directory /usr/share>
    AllowOverride None
    Require all granted
</Directory>

<Directory /mnt/server/www>
    Options -Indexes +FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

AccessFileName .htaccess
<FilesMatch "^\.ht">
    Require all denied
</FilesMatch>

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf

RequestHeader unset Proxy early
SSLProtocol all -SSLv2 -SSLv3

Вот мой VHost

<IfModule mod_headers.c>
    Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>

<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /mnt/server/www/ms/public

    Alias /iredadmin/static "/opt/www/iredadmin/static/"
    WSGIScriptAlias /iredadmin "/opt/www/iredadmin/iredadmin.py/"
    Alias /mail "/opt/www/roundcubemail/"
    Alias /awstats/icon "/usr/share/awstats/icon/"
    Alias /awstatsicon "/usr/share/awstats/icon/"
    ScriptAlias /awstats "/usr/lib/cgi-bin/"

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
    RewriteRule ^ https://www.%1%{REQUEST_URI} [L,R=permanent]
    RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
    RewriteRule ^(.*)$ https://%{HTTP:HOST}%{REQUEST_URI} [L,R=permanent]

    ErrorLog /mnt/server/www/ms/error/error.log
    CustomLog /mnt/server/www/ms/error/access.log combined
</VirtualHost>

Есть пара поддоменов, но они не имеют значения для этой цели. Весь трафик направляется через порт 80, но https обслуживается через ELB, который я настроил на AWS, а сертификат обслуживается с помощью ACM.

0 ответов

Другие вопросы по тегам