• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Access webmail via IP address (without domain name)

webmail

Its not possible to access webmail via an IP in plesk .
 
I tried to add an Alias to the default host for my IP, via a vhost.conf file containing:

Alias /webmail /usr/share/psa-horde

In order to access webmail via:
IP.IP.IP.IP/webmail

It seems to work, but I got some PHP errors:

Warning: include_once(PEAR.php) [function.include-once]: failed to open stream: No such file or directory in /usr/share/psa-horde/lib/core.php on line 45

Warning: include_once() [function.include]: Failed opening 'PEAR.php' for inclusion (include_path='/usr/share/psa-horde/lib:.:') in /usr/share/psa-horde/lib/core.php on line 45

Warning: include_once(Log.php) [function.include-once]: failed to open stream: No such file or directory in /usr/share/psa-horde/lib/Horde.php on line 3

Warning: include_once() [function.include]: Failed opening 'Log.php' for inclusion (include_path='/usr/share/psa-horde/lib:.:') in /usr/share/psa-horde/lib/Horde.php on line 3

Any idea on how to resolve those errors?
 
I finally ended up with this:
----------------------------

<Directory /usr/share/psa-horde>
<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/etc/psa:/usr/share/psa-horde:/usr/share/psa-horde/config:/tmp"
php_admin_value include_path "/usr/share/psa-horde/lib:/usr/share/psa-horde/pear:."
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/etc/psa:/usr/share/psa-horde:/usr/share/psa-horde/config:/tmp"
php_admin_value include_path "/usr/share/psa-horde/lib:/usr/share/psa-horde/pear:."
</IfModule>
</Directory>
Alias /webmail /usr/share/psa-horde

----------------------------

Okay, now, I got redirected to this page:
/login.php?Horde3=bm77adeasmo4l0ujc0s1rvuqk6
Instead of /webmail/login.php...

But if I get this address:
http://IP.IP.IP.IP/webmail/imp/login.php
The Login page of IMP shows up!

I have to write a rule to rewrite "/" to "/webmail"...

How could I do this using Apache Rewrite Rules... Any Ideas?
 
Here we go!! This method is working for subdomains: accessing webmail via mysub.domain.tld/webmail ...

I added a .htaccess file in the directory which refers to /:

RewriteEngine on
RewriteRule ^(.*)$ /webmail/$1

So, finaly, I'm using this for a shared SSL:
https://secure.mydomain.com/webmail

But it still shows an internal error when it's set on a main vhost... So, it's not working for the IP access.
 
You can copy content of /usr/share/psa-horde into /var/www/default/htdocs folder.

Regards
 
Back
Top