我在CentOS7上安装了(几乎)RoundCubeMail。 我设置了Apache / 2.4.6服务器,所以当我放弃到本地主机(或127.0.0.1),我可以看到Apache(testing1 2 3 …)的开始/testing页面。
我在/ var / www / html / roundcube中安装了roundcube。 我在db.inc.php和main.inc.php文件中做了所有的configuration,我的roundcube根目录有755的权限。
我的Apache服务器工作完美…但是当我去http:// localhost / roundcubemail / installer我有403禁止错误。
我为Apache编写了这个目录:
setenforce 0 sudo chown -R apache /var/www/html sudo chmod 755 -R /var/www/html
任何想法,什么可能是错的?
这是我的Apacheconfiguration文件:
ServerRoot "/etc/httpd" Listen *:80 Include conf.modules.d/*.conf User apache Group apache ServerAdmin root@localhost <Directory /> AllowOverride none Require all denied </Directory> DocumentRoot "/var/www/html" <Directory "/var/www"> AllowOverride None # Allow open access: #Require all granted allow from all </Directory> # Further relax access to the default document root: <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride None Allow from all # Require all granted </Directory> <Directory "/var/www/html/roundcubemail"> Options Indexes FollowSymLinks AllowOverride None Allow from all </Directory> <IfModule dir_module> DirectoryIndex index.html </IfModule> <Files ".ht*"> Require all denied </Files> ErrorLog "logs/error_log" LogLevel warn <IfModule log_config_module> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common <IfModule logio_module> # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule> CustomLog "logs/access_log" combined </IfModule> <IfModule alias_module> ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" </IfModule> <Directory "/var/www/cgi-bin"> AllowOverride None Options None Require all granted </Directory> <IfModule mime_module> TypesConfig /etc/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType text/html .shtml AddOutputFilter INCLUDES .shtml </IfModule> AddDefaultCharset UTF-8 <IfModule mime_magic_module> MIMEMagicFile conf/magic </IfModule> EnableSendfile on IncludeOptional conf.d/*.conf
访问控制是指任何控制对任何资源的访问的手段。
参考: 访问控制 – Apache HTTP服务器版本2.4
确保你的/etc/httpd/conf/httpd.conf包含以下内容:
<Directory "/var/www/html"> Require all granted </Directory>
另外,请看下面的内容:
从2.2升级到2.4 – Apache HTTP Server版本2.5
这可能是由Apache服务器设置造成的,因为Brian的服务器目录索引为
<IfModule dir_module> DirectoryIndex index.html </IfModule>
但是Roundcube要求index.php被服务器识别以进行索引。 这就是为什么它被拒绝。