Hi all,
i use Roundcube on a Proxmox Container with Debian / Testing a long time. Now aftern an upgrade to RC 1.6.9 works my Reverse Proxy Configuration not more.
When i call the local ip from the roundcube host with my browser works all as before after the upgrade, if i will connect over the proxy server to my internal roundcube host comes after the login an error message with denied access.
I use apache on both maschines (reverse and roundcube host)
What is the diffrent between these both versions with using reverse proxy?
My local config:
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName xxx.xxx.xxx.xx
ServerAlias 192.168.1.154 mail
DocumentRoot /var/lib/roundcube/public_html
Protocols h2 http/1.1
ErrorLog ${APACHE_LOG_DIR}/error.log
SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
CustomLog ${APACHE_LOG_DIR}/access.log combined env=!dontlog
SSLEngine on
SSLCertificateFile /opt/sslcert/fullchain.pem
SSLCertificateKeyFile /opt/sslcert/privkey.pem
Include /etc/phpmyadmin/apache.conf
Include /etc/roundcube/apache.conf
RewriteEngine On
#RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/.*
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L,R=301]
# rspamd
RewriteRule ^/rspamd$ /rspamd/ [R,L]
RewriteRule ^/rspamd/(.*) http://localhost:11334/$1 [P,L]
ProxyPass "/rspamd" "http://localhost:11334"
ProxyPassReverse "/rspamd" "http://localhost:11334"
</VirtualHost>
My reverse_proxy config:
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName xxx.xxx.xxx.xx
SetEnvIf Request_URI ^/server-status$ dontlog
CustomLog /var/log/apache2/access.log combined env=!dontlog
ErrorLog /var/log/apache2/error.log
LogLevel warn
ModPagespeedEnableCachePurge on
ModPagespeedPurgeMethod PURGE
Protocols h2 http/1.1
# LetsEncrypt
SSLCertificateKeyFile /etc/letsencrypt/live/xxx.xxx.xxx.xx/privkey.pem
SSLCertificateFile /etc/letsencrypt/live/xxx.xxx.xxx.xx/fullchain.pem
SSLEngine on
LimitXMLRequestBody 0
LimitRequestBody 0
RewriteEngine On
## roundcube mail
#ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://192.168.178.1/roundcube/
ProxyPassReverse / http://192.168.1.154/roundcube/
<Proxy *>
AuthUserFile /var/www/https/conf/.htpasswd
AuthName EnterPassword
AuthType Basic
Require valid-user
#Require all granted
</Proxy>
</VirtualHost>
I'm not certain about this but have a look at the `request_path` config var. From the changelog:
QuoteAdd workaround for using Roundcube behind a reverse proxy with a subpath: 'request_path' option (#8738, #8770)
These are the linked issues:
https://github.com/roundcube/roundcubemail/issues/8738
https://github.com/roundcube/roundcubemail/issues/8770
Quote from: JohnDoh on January 13, 2025, 04:23:54 PMI'm not certain about this but have a look at the `request_path` config var.
Thank you @JohnDoh
Now it works with adding:
$config['request_path'] = '/';
in my config.inc.php