• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Webmail and Phpmyadmin Url

Gaylord

New Pleskian
Hello,

Sorry for my bad english, I'm french :)

I want to configure my webmail for mydomain.com/webmail1012/ (not webmail.domain.com)
And mydomain.com/phpmyadmin1012/ for phpmyadmin

It's possible ? :)
Thank you very much for your help
 
I want to configure my webmail for mydomain.com/webmail1012/ (not webmail.domain.com)
It was discussed here many times. Just try to use Forum Search for phrase "domainWebmail.php" and you will see many related treads.
 
Yes, I see ... but I have 404 error :/

I changed (I have just one domain) :

/usr/local/psa/admin/conf/templates/default/webmail/nginxWebmail.php for :
Code:
<?php /** @var Template_VariableAccessor $VAR */ ?>
<?php
if (!$VAR->domain->webmail->isActive) {
    echo "# Webmail is not enabled on the domain\n";
    return;
}
?>
<?php foreach ($VAR->domain->webmail->ipAddresses as $ipAddress): ?>
server {
    listen <?php echo $ipAddress->escapedAddress . ':' . $OPT['frontendPort'] . ($OPT['ssl'] ? ' ssl' : '') ?>;
    server_name "<?php echo $VAR->domain->asciiName ?>/webmail1012";
    <?php foreach ($VAR->domain->mailAliases as $alias): ?>
        server_name  "<?php echo $alias->asciiName ?>/webmail1012";
    <?php endforeach; ?>

<?php if ($OPT['ssl']): ?>
<?php $sslCertificate = $VAR->server->sni && $VAR->domain->webmail->sslCertificate
        ? $VAR->domain->webmail->sslCertificate
        : $ipAddress->sslCertificate; ?>
<?php   if ($sslCertificate->ce): ?>
    ssl_certificate             <?php echo $sslCertificate->ceFilePath ?>;
    ssl_certificate_key         <?php echo $sslCertificate->ceFilePath ?>;
<?php       if ($sslCertificate->ca): ?>
    ssl_client_certificate      <?php echo $sslCertificate->caFilePath ?>;
<?php       endif ?>
<?php   endif ?>
<?php endif ?>

    client_max_body_size 128m;

    location / {
<?php if ($OPT['ssl']): ?>
        proxy_pass https://<?php echo $ipAddress->proxyEscapedAddress . ':' . $OPT['backendPort'] ?>;
<?php else: ?>
        proxy_pass http://<?php echo $ipAddress->proxyEscapedAddress . ':' . $OPT['backendPort'] ?>;
<?php endif ?>
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

<?php endforeach; ?>

And /usr/local/psa/admin/conf/templates/default/webmail/webmail.php for :
Code:
<?php echo AUTOGENERATED_CONFIGS; ?>
<?php /** @var Template_VariableAccessor $VAR */ ?>
<?php
if (!$VAR->domain->webmail->isActive) {
    echo "# Webmail is not enabled on the domain\n";
    return;
}
?>
<?php foreach ($VAR->domain->webmail->ipAddresses as $ipAddress): ?>
<VirtualHost <?php
    echo "{$ipAddress->escapedAddress}:{$VAR->server->webserver->httpPort}";
    echo $VAR->server->webserver->proxyActive ? " 127.0.0.1:{$VAR->server->webserver->httpPort}" : "";
    ?>>

    ServerName "<?php echo $VAR->domain->asciiName ?>/webmail1012"
    <?php foreach ($VAR->domain->mailAliases as $alias): ?>
        ServerAlias  "<?php echo $alias->asciiName ?>/webmail1012"
    <?php endforeach; ?>

    UseCanonicalName Off

    <?php switch ($VAR->domain->webmail->type) {
        case 'atmail':
            echo $VAR->includeTemplate('webmail/atmail.php');
            break;
        case 'horde':
            echo $VAR->includeTemplate('webmail/horde.php');
            break;
        case 'roundcube':
            echo $VAR->includeTemplate('webmail/roundcube.php');
            break;
    } ?>

    <?php echo $VAR->includeTemplate('domain/PCI_compliance.php') ?>

</VirtualHost>
<?php endforeach; ?>

<IfModule mod_ssl.c>
<?php foreach ($VAR->domain->webmail->ipAddresses as $ipAddress): ?>
<VirtualHost <?php
    echo "{$ipAddress->escapedAddress}:{$VAR->server->webserver->httpsPort}";
    echo $VAR->server->webserver->proxyActive ? " 127.0.0.1:{$VAR->server->webserver->httpsPort}" : "";
    ?>>

    ServerName "<?php echo $VAR->domain->asciiName ?>/webmail1012"
    <?php foreach ($VAR->domain->mailAliases as $alias): ?>
        ServerAlias  "<?php echo $alias->asciiName ?>/webmail1012"
    <?php endforeach; ?>

    UseCanonicalName Off

    <?php $sslCertificate = $VAR->server->sni && $VAR->domain->webmail->sslCertificate
            ? $VAR->domain->webmail->sslCertificate
            : $ipAddress->sslCertificate; ?>
    <?php if ($sslCertificate->ce): ?>
        SSLEngine on
        SSLVerifyClient none
        SSLCertificateFile <?php echo $sslCertificate->ceFilePath ?>

    <?php if ($sslCertificate->ca): ?>
        SSLCACertificateFile <?php echo $sslCertificate->caFilePath ?>
    <?php endif; ?>
    <?php endif; ?>

    <?php switch ($VAR->domain->webmail->type) {
        case 'atmail':
            echo $VAR->includeTemplate('webmail/atmail.php');
            break;
        case 'horde':
            echo $VAR->includeTemplate('webmail/horde.php');
            break;
        case 'roundcube':
            echo $VAR->includeTemplate('webmail/roundcube.php');
            break;
    } ?>

    <?php echo $VAR->includeTemplate('domain/PCI_compliance.php') ?>

</VirtualHost>
<?php endforeach; ?>
</IfModule>

And restart Apache, Nginx and " /usr/local/psa/admin/bin/httpdmng --reconfigure-all ". Can you help me ? :)
THanks
 
First of all, you SHOULDN'T change DEFAULT Templates! You need to use CUSTOM templates for applying any customizations! Read more about custom vhost templates in Plesk documentation.
 
Back
Top