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?
Posts by robind
-
-
Quote
You should write in this area only in englishI 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?
-
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?
-
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- <VirtualHost MY_IP:80> ServerName webmail.MY_DOMAIN ServerAlias webmail.* ServerAdmin info@douglas-media.de 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.
Code- ; Start a new pool named 'MY_DOMAIN'.
- ; the variable $pool can be used in any directive and will be replaced by the
- ; pool name ('MY_DOMAIN' here)
- [webmail]
- ; Per pool prefix
- ; It only applies on the following directives:
- ; - 'slowlog'
- ; - 'listen' (unixsocket)
- ; - 'chroot'
- ; - 'chdir'
- ; - 'php_values'
- ; - 'php_admin_values'
- ; When not set, the global prefix (or /usr) applies instead.
- ; Note: This directive can also be relative to the global prefix.
- ; Default Value: none
- ;prefix = /path/to/pools/$pool
- ; Unix user/group of processes
- ; Note: The user is mandatory. If the group is not set, the default user's group
- ; will be used.
- user = vu2000
- group = vu2000
- ; The address on which to accept FastCGI requests.
- ; Valid syntaxes are:
- ; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
- ; a specific port;
- ; 'port' - to listen on a TCP socket to all addresses on a
- ; specific port;
- ; '/path/to/unix/socket' - to listen on a unix socket.
- ; Note: This value is mandatory.
- listen = /var/run/php5-fpm-webmail.socket
- ; Set listen(2) backlog. A value of '-1' means unlimited.
- ; Default Value: 128 (-1 on FreeBSD and OpenBSD)
- ;listen.backlog = -1
- ; Set permissions for unix socket, if one is used. In Linux, read/write
- ; permissions must be set in order to allow connections from a web server. Many
- ; BSD-derived systems allow connections regardless of permissions.
- ; Default Values: user and group are set as the running user
- ; mode is set to 0666
- listen.owner = vu2000
- listen.group = vu2000
- listen.mode = 0660
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