/phpmyadmin /webmail, etc doesn't work with DA 1.45.1 + CB 2 + PHP-FPM + Apache 2.4.9

nmb

Verified User
Joined
Sep 13, 2008
Messages
223
Just upgraded DA to 1.45.1 with CB2 RC7, PHP-FPM and Apache 2.4.9. It seems to work fine except... I can't access my domain with /webmail, /phpmyadmin or anything that is in /etc/httpd/conf/extra/httpd-alias.conf except "/squirrelmail" and "/roundcube"

After enter the URL I got the white screen with this text -> "File not found."

With IP address in this format -> x.x.x.x/phpmyadmin , I can access /phpmyadmin but not /webmail.


Please help.


Thank you,
 
Last edited:
Regarding phpMyAdmin, does your /etc/httpd/conf/extra/httpd-alias.conf contain this line at the bottom?:

Code:
Alias /phpmyadmin /var/www/html/phpMyAdmin/

If not, you need to add it. At the bottom of my httpd-alias.conf I always make sure I have this:

Code:
# Alias for RoundCube webmail
Alias /roundcube /var/www/html/roundcube/
Alias /phpmyadmin /var/www/html/phpMyAdmin/

The Roundcube-alias was added by DirectAdmin, so that should be fine, however the phpMyAdmin-alias was not added by DirectAdmin, so you need to add that one yourself. Before you add the above, you can test that serverhostname.com/phpMyAdmin works, because it is capital letters, so you need to add the alias for phpmyadmin if you also want serverhostname.com/phpmyadmin without capital letters to also work.

Edit: Remember to restart httpd after adding the alias ...
 
Last edited:
Here is my http-alias.conf


Alias /config /var/www/html/redirect.php
Alias /squirrelmail /var/www/html/squirrelmail
Alias /roundcube /var/www/html/roundcube
Alias /webmail /var/www/html/roundcube
Alias /phpMyAdmin /var/www/html/phpMyAdmin
Alias /phpmyadmin /var/www/html/phpMyAdmin
Alias /pma /var/www/html/phpMyAdmin

I checked on 2 servers. One with CB 2.0 but not upgrade to the latest yet. (Apache 2.4.7) Both of them have the same http-alias.conf. But only the one with the latest update got the problem.
 
Did you run rewrite_confs after upgrade of DirectAdmin? If not, try that (remember you need to add back custom changes you might have in /etc/httpd/conf/...:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build rewrite_confs

Also if you upgraded Apache to 2.4.9, remeber to recompile PHP:
Code:
./build php n

If it still does not work, I would PM smtalk or send email to support at directadmin.com
 
I did both ./build rewrite_confs and ./build php n before test. Feel like Apache 2.4.9 with Socket is faster than using mod_fastcgi + PHP-FPM. But the webmail link problem stop me from upgrade the rest of my servers.

Thanks
 
Do you have any files in /usr/local/directadmin/custombuild/custom ?
 
Do you have any files in /usr/local/directadmin/custombuild/custom ?

I do not have custom folder under /usr/local/directadmin/custombuild

Also, checked to make sure that the only file I have in /usr/local/directadmin/data/templates/custom is dns_a.conf. Then, just ran ./build rewrite_confs again before replied. Still got the same problem.
 
I forgot to mention another solution, you may create a real symlink in /var/www/html to fix the problem. For example, you need /webmail pointing to RoundCube, this way you could do:
Code:
ln -s /var/www/html/roundcube /var/www/html/webmail
chown -h webapps:webapps /var/www/html/webmail

That's it! :) So it's up to you which solution to choose for now.

P.S. that's why /phpMyAdmin works and /phpmyadmin does not
 
[..cut..]
P.S. that's why /phpMyAdmin works and /phpmyadmin does not

Here is a feature request: Please add alias for phpmyadmin (without capital letters) in /etc/httpd/conf/extra/httpd-alias.conf, you already do that when we install Roundcube in CB, so why not add it also for phpMyAdmin:

Code:
Alias /phpmyadmin /var/www/html/phpMyAdmin/

Thanks.
 
ditto, probably my answer was a bit misleading for you. This thread is about PHP-FPM problem with Apache 2.4.9. "Alias" lines work fine in Apache configuration, however, "ProxyPassMatch" ones (needed for aliases to work with PHP-FPM), do not. That's why I wrote 2 solutions available to workaround the problem and URL to the thread which describes the problem in Apache HTTPd mailing lists.
 
But my request still stands. I run Apache 2.4.9, CB 2, mod_php + mod_ruid2, and serverhostname.com/phpmyadmin does not work, it only work with capital letters, phpMyAdmin. Every time I do ./build rewrite_confs, I need to add back the above posted phpmyadmin alias to the bottom of httpd-alias.conf. I have reported this several times in the forums during the last year. I would call it a bug. Please add the phpmyadmin alias to httpd-alias.conf
 
i can also confirm this. no custom configurations on my server.
/roundcube does work indeed but not /phpmyadmin or /pma, when using capitals it does work (/phpMyAdmin)
 
Yes, I do not have that custom file. The only custom file I have is:

/usr/local/directadmin/custombuild/custom/ap2/configure.php55

I also did a ./build rewrite_confs only a few days ago, and this is what my httpd-alias.conf looked like after the ./build rewrite_confs:

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^xxxx.xxx.com$
RewriteCond %{REQUEST_URI} ^/config/ [OR]
RewriteCond %{REQUEST_URI} ^/config$ [OR]
RewriteRule ^/config(.*) https://xxxx.xxx.com/redirect.php$1

RewriteCond %{HTTP_HOST} !^xxxx.xxx.com$
RewriteCond %{REQUEST_URI} ^/roundcube/ [OR]
RewriteCond %{REQUEST_URI} ^/roundcube$ [OR]
RewriteRule ^/roundcube(.*) https://xxxx.xxx.com/roundcube$1

RewriteCond %{HTTP_HOST} !^xxxx.xxx.com$
RewriteCond %{REQUEST_URI} ^/webmail/ [OR]
RewriteCond %{REQUEST_URI} ^/webmail$ [OR]
RewriteRule ^/webmail(.*) https://xxxx.xxx.com/roundcube$1

RewriteCond %{HTTP_HOST} !^xxxx.xxx.com$
RewriteCond %{REQUEST_URI} ^/phpMyAdmin/ [OR]
RewriteCond %{REQUEST_URI} ^/phpMyAdmin$ [OR]
RewriteRule ^/phpMyAdmin(.*) https://xxxx.xxx.com/phpMyAdmin$1

RewriteCond %{HTTP_HOST} !^xxxx.xxx.com$
RewriteCond %{REQUEST_URI} ^/phpmyadmin/ [OR]
RewriteCond %{REQUEST_URI} ^/phpmyadmin$ [OR]
RewriteRule ^/phpmyadmin(.*) https://xxxx.xxx.com/phpMyAdmin$1

RewriteCond %{HTTP_HOST} !^xxxx.xxx.com$
RewriteCond %{REQUEST_URI} ^/pma/ [OR]
RewriteCond %{REQUEST_URI} ^/pma$ [OR]
RewriteRule ^/pma(.*) https://xxxx.xxx.com/phpMyAdmin$1

Then I must add back these two lines at the bottom of the file:

Code:
Alias /roundcube /var/www/html/roundcube/
Alias /phpmyadmin /var/www/html/phpMyAdmin/
 
Thanks smtalk, I picked the 2nd method which behave similar to what it used to be. The first method will redirect the link to the server name which I don't like.

Also, my http-alias.conf shows as what I have posted above.

Alias /config /var/www/html/redirect.php
Alias /squirrelmail /var/www/html/squirrelmail
Alias /roundcube /var/www/html/roundcube
Alias /webmail /var/www/html/roundcube
Alias /phpMyAdmin /var/www/html/phpMyAdmin
Alias /phpmyadmin /var/www/html/phpMyAdmin
Alias /pma /var/www/html/phpMyAdmin

Date on file is today which should just be updated after ran ./build rewrite_confs

Thanks,
 
Last edited:
I would like to note that this issue has already been fixed in latest version of CB 2.0. No additional changes are needed, no symlinking in /var/www/html of aliases too :)
 
Back
Top