I'm trying to solve a problem with Roundcube. On monday I was updating server and installing php 7.1.5 (Debian 8 with ISPConfig) manual: https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/. It seems that php and everyting else is working except Roundcube webmail.
Users started complaining that they cannot acces Roundcube webpage with error: ERROR: Config file "config/config.php" not found. You need to configure SquirrelMail before you can use it.
Like what? I'm not using Squirrelmail. What I find out was that there was missing config file for roundcube in apache2/conf-enabled, so I created annother one with alias
poiting to /usr/share/roundcube
.
Config file /etc/apache2/conf-enabled/roundcube.conf
Alias /roundcube /usr/share/roundcube
Alias /webmail /usr/share/roundcube
<Directory /usr/share/roundcube>
Options +FollowSymLinks
# AddDefaultCharset UTF-8
AddType text/x-component .htc
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag display_errors Off
php_flag log_errors On
# php_value error_log logs/errors
php_value upload_max_filesize 10M
php_value post_max_size 12M
php_value memory_limit 64M
php_flag zlib.output_compression Off
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
php_flag zend.ze1_compatibility_mode Off
php_flag suhosin.session.encrypt Off
#php_value session.cookie_path /
php_flag session.auto_start Off
php_value session.gc_maxlifetime 21600
php_value session.gc_divisor 500
php_value session.gc_probability 1
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^favicon\.ico$ skins/larry/images/favicon.ico
# security rules:
# - deny access to files not containing a dot or starting with a dot
# in all locations except installer directory
RewriteRule ^(?!installer)(\.?[^\.]+)$ - [F]
# - deny access to some locations
RewriteRule ^/?(\.git|\.tx|SQL|bin|config|logs|temp|tests|program\/(include|lib|localization|steps)) - [F]
# - deny access to some documentation files
RewriteRule /?(README\.md|composer\.json-dist|composer\.json|package\.xml)$ - [F]
</IfModule>
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
</IfModule>
FileETag MTime Size
<IfModule mod_autoindex.c>
Options -Indexes
</ifModule>
AllowOverride None
Require all granted
</Directory>
<Directory /usr/share/roundcube/plugins/enigma/home>
Options -FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share/roundcube/config>
Options -FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share/roundcube/temp>
Options -FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share/roundcube/logs>
Options -FollowSymLinks
AllowOverride None
Require all denied
</Directory>
If I type wrong alias, I get 404, sor alias is working poiting to that directory, but then.. Huh.. Also I winf another roundcube folder in roundcube folder /usr/share/roundcube/roundcube with exactly same code like in parent with time matching to Linux update / php installation.
IMAP is working. Just Rouncube part is messed up.
Any advice would be appreciated. Thank you
Problem solved. For others with same problem:
There was a symlink in
/usr/share/squirrelmail -> roundcube
, so when I ranapt-get upgrade
the system wrote new squirrelmail files to roundcube folder and rewritedindex.html
(error from my first post:ERROR: Config file "config/config.php" not found. You need to configure SquirrelMail before you can use it.
), so after typing<server-ip>/webmail
it was trying to run unconfigured squirrelmail from roundcube folder so it was "masking" itself :)I was unaware of this symlink (I haven't installed that server) and after downloading propriete version of roundcube and copying files to
/usr/share/roundcube
(+ plus deleting squirrelmail files) the roundcube started working again properly.