How to use i-MSCP tools via subdomain?

  • Hello,


    I wan't to have access to the i-MSCP tools via subdomain (e.g webmail.CUSTOMER_DOMAIN.TLD). So I created the files 02_webmail.conf in /etc/apache2/sites-available with the following content and added the newly created site to apache.


    Code
    1. <VirtualHost MY_IP:80> ServerName webmail.MY_DOMAIN ServerAlias webmail.* ServerAdmin [email protected] DocumentRoot /var/www/imscp/gui/public/tools/webmail LogLevel error ErrorLog /var/log/apache2/webmail/error.log SuexecUserGroup vu2000 vu2000 # SECTION php_enabled BEGIN. # SECTION php_fpm BEGIN. Alias /php5-fcgi /var/lib/apache2/fastcgi/php5-fcgi-webmail FastCGIExternalServer /var/lib/apache2/fastcgi/php5-fcgi-webmail \ -socket /var/run/php5-fpm-webmail.socket \ -idle-timeout 300 \ -pass-header Authorization # SECTION php_fpm END. # SECTION php_enabled END. <Directory /var/www/imscp/gui/public/tools/webmail> Options +FollowSymlinks AllowOverride All RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ plugins.php [NC,L] Allow from all </Directory></VirtualHost>


    Then I added a file named "webmail.conf" in /etc/php5/fpm becaus I am using PHP5-FPM.



    I restarted php5-fpm and apache2 and tested it, but unfortunatly the site is blank and no php-script will be executed. Do you have any suggestions what is wrong?


    Thanks for your help!


    PS: Sorry for my bad english ;-)

  • I don't know if you and I mean the same thing, but there is an hook file. Look at this:


    Hooks::Apache2::Tools::Redirects


    P.S.: Sorry for my bad english, I'm from Germany :)


    Danke für den Hinweis! Das klappt leider nicht. Muss ich das Hook-File noch irgendwo im Backend aktivieren? Ich möchte, dass die Tools immer als Subdomain der Kundendomain erreichbar sind (also. z.B. webmail.meine-domain.de). Funktioniert das irgendwie?

  • Danke für den Hinweis! Das klappt leider nicht. Muss ich das Hook-File noch irgendwo im Backend aktivieren? Ich möchte, dass die Tools immer als Subdomain der Kundendomain erreichbar sind (also. z.B. webmail.meine-domain.de). Funktioniert das irgendwie?


    You should write in this area only in english :)


    I don't use any hook file, so I can't give you good support.


    Do you have done the install steps mentioned in the plugin store?


    Quote

    Download the hook file into the /etc/imscp/hooks.d directory
    Run the imscp-setup script

  • Quote


    You should write in this area only in english


    I don't use any hook file, so I can't give you good support.


    Do you have done the install steps mentioned in the plugin store?


    Okay, i will keep this in mind ;-)


    Yes, I'v done all installed steps mentioned in the plugin store and called the imscp-setup with the reconfigure option. Is this right?

  • Okay, now it works. But it is not what I want. I want to have access to the tools via subdomain (e.g. webmail.client-domain.de) and not via a folder of my primary domain (e.g my-domain.de/webmail). Is there a way to achieve this using php5-fpm and not fcgi?

  • Okay, now it works. But it is not what I want. I want to have access to the tools via subdomain (e.g. webmail.client-domain.de) and not via a folder of my primary domain (e.g my-domain.de/webmail). Is there a way to achieve this using php5-fpm and not fcgi?


    Sorry :(


    I thought that this hook file is also allowing webmail.example.com...