set url for webmail

Discussion in 'Installation/Configuration' started by Oscar Previti, Apr 14, 2023.

  1. BjoernHH

    BjoernHH New Member

    Sorry that this does not work for you :-(

    I can't really read the config, I came to this solution by try-and-error because I said to myself, what is a quasi server-wide setting at apache, that should also work at a vHost.

    Maybe your roundcube is installed somewhere else and you have to adjust paths somewhere, I found the paths for PHP open_basedir like this, maybe there is something different with you:

    "/etc/apache2/conf-available/roundcube.conf" points to "/etc/roundcube/apache.conf"
    "/etc/roundcube/apache.conf" has the line "Alias /webmail /var/lib/roundcube/public_html"
    "/var/lib/roundcube/public_html/.htaccess" points to "/var/lib/roundcube/.htaccess"
    "/var/lib/roundcube/index.php" point to "/usr/share/roundcube/index.php"

    Or can you see in the log /var/log/ispconfig/httpd/webmail.sharezone.cloud/error.log at which file the server doesn't want to access?
     
  2. Oscar Previti

    Oscar Previti Member

    the error log is empty
     
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I really why you are trying so hard since your webmail is already working fine at https://hosting.sharezone.cloud:8081/webmail/

    I already give a link where a member have a working reverse proxy but your only answer was (sadly) just:
    With no details provided you are not actually helping us to help you.

    Perhaps this is best to advise you with:
     
  4. Oscar Previti

    Oscar Previti Member

    function without port

    https://hosting.sharezone.cloud/webmail/

    but i need change url only webmail consultant https://webmail.sharezone.cloud
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so you need to create a website webmail.sharezone.cloud and there you add a reverse proxy config in the apache directives field. You just mentioned that the system goes down when you use it, but you neither mentioned which exact proxy directives you used nor the exact error message you get.
     
    ahrasis likes this.
  6. Oscar Previti

    Oscar Previti Member

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    SSLProxyEngine On
    RequestHeader set Front-End-Https "On"
    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / https://1.2.3.4:8080/
    ProxyPassReverse / https://1.2.3.4:8080/
    <Proxy *>
    Order deny,allow
    Allow from all
    </Proxy>
     
  7. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Sighed, no wonder it failed. The sample is for ISPConfig UI so one must make necessary changes like the domain, IP, port and folder respectively, and should not follow things blindly and expect them to work.
     
  8. Oscar Previti

    Oscar Previti Member

    obviously I replaced with name and ip
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    It's not just the name and IP. You must change the whole target URL as webmail is not installed on / and port 8080. So the target:

    https://1.2.3.4:8080/

    Must be replaced with something like:

    https://serverhostname.tld:8081/webmail/

    And you still did not post the error message of the 500 error from error.log file of the website (and also maybe global error.log).
     
  10. Oscar Previti

    Oscar Previti Member

    GREAT now work but i add

    SSLProxyCheckPeerCN Off
    SSLProxyCheckPeerName Off

    the final conf is :

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    SSLProxyEngine on
    SSLProxyCheckPeerCN Off
    SSLProxyCheckPeerName Off

    RequestHeader set Front-End-Https "On"
    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / https://hosting.sharezone.cloud:8081/webmail/
    ProxyPassReverse / https://hosting.sharezone.cloud:8081/webmail/
    <Proxy *>
    Order deny,allow
    Allow from all
    </Proxy>

    thanks all for great support and patience
     
    till likes this.

Share This Page