1

I am using PHP 7.0.5 and Apache 2.4.20 and I would like to run Squirrelmail.

I am getting a 403 Forbidden error when I try to access any of the squirrelmail pages like HostName/squirrelmail, HostName/squirrelmail/src/login.php or HostName/squirrelmail/src/configtest.php ect.

In my httpd.conf I have:

 Alias /squirrelmail /usr/local/squirrelmail/www
<Directory /usr/local/squirrelmail/www>
  Options None
  AllowOverride None
  DirectoryIndex index.php
  Order Allow,Deny
  Allow from all
</Directory>
MortenS
  • 43
  • 5
  • Would you please let me know document root for Host name ? – Maulik Kanani Jul 01 '16 at 12:12
  • Most likely cause is a permissions issue on the content. It looks like a Unix/Linux system - what are the filesystem permissions / ACLs and SELinux attributes? – symcbean Jul 01 '16 at 15:17
  • The Apache root is /usr/local/apache/htdocs. I am trying to host the content from /usr/local/squirrelmail/www. I will check the access rights of the squirrelmail folders when I'm at work tomorrow. – MortenS Jul 03 '16 at 13:28
  • I have changed the permissions of the squirrelmail folder to rwx for user group and others, but it din't solve the problem. When I moved the squirrelmail folder inside the apache/htdocs I could execute the php scripts without any problems. – MortenS Jul 04 '16 at 13:05

2 Answers2

1

This is due to httpd 2.4 access control has changed from the previous version the solution is as follows

Order allow,deny Allow from all

should be replaced by:

Require all granted

then restart httpd

systemctl restart httpd

Pawan Patil
  • 1,067
  • 5
  • 20
  • 46
1

You must check the log of Apache to solve the problem, in centos 7 the logs will be in tow pathes:

/var/log/httpd/error_log

Or

/var/log/httpd/ssl_error_log

In generally Apache vhost.conf file must contain this lines:

Alias /webmail /usr/share/squirrelmail

<Directory "/usr/share/squirrelmail">
    Options Indexes MultiViews
    Require all granted
    AllowOverride none
    Order allow,deny
    Allow from all
    Options +SymLinksIfOwnerMatch
    DirectoryIndex index.php index.html index.htm
</Directory>
AnasSafi
  • 5,353
  • 1
  • 35
  • 38