You are not logged in.

#1 2014-11-19 12:39:01

rekahsoft
Member
Registered: 2010-07-18
Posts: 33
Website

phpmyadmin apache subdomain [SOLVED]

Hi all, I've been having issues setting up phpmyadmin as a subdomain. When accessing the subdomain at https://phpmyadmin.domain.com everything seemingly works but upon logging I am redirected to a broken url; specifically: https://phpmyadmin.domain.comindex.php/?token=...

Notice the missing slash? It should be https://phpmyadmin.domain.com/index.php/?token=...

Now after attempting to login and being redirecting to the wrong URL if I goto https://phpmyadmin.domain.com I am logged in and phpmyadmin works seemingly normally.

After taking a gander at my logs (specifically /var/log/httpd/phpmyadmin.domain.com-errors) I notice this is happening for more then one uri:

[Wed Nov 19 05:13:22.682498 2014] [authz_core:error] [pid 23773] [client 100.100.100.100:53846] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdminindex.php, referer: https://phpmyadmin.domain.com/
[Wed Nov 19 05:13:22.682643 2014] [authz_core:error] [pid 23773] [client 100.100.100.100:53846] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdminerror, referer: https://phpmyadmin.domain.com/
[Wed Nov 19 05:13:22.774033 2014] [authz_core:error] [pid 23773] [client 100.100.100.100:53846] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdminfavicon.ico
[Wed Nov 19 05:13:24.966014 2014] [authz_core:error] [pid 23773] [client 100.100.100.100:53846] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdminindex.html
[Wed Nov 19 05:13:24.966075 2014] [authz_core:error] [pid 23773] [client 100.100.100.100:53846] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdminindex.php
[Wed Nov 19 05:13:24.966112 2014] [authz_core:error] [pid 23773] [client 100.100.100.100:53846] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdminerror
[Wed Nov 19 05:13:25.055801 2014] [authz_core:error] [pid 23773] [client 100.100.100.100:53846] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdminfavicon.ico
[Wed Nov 19 05:13:28.399678 2014] [authz_core:error] [pid 23773] [client 100.100.100.100:53846] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdminindex.html
[Wed Nov 19 05:13:28.399745 2014] [authz_core:error] [pid 23773] [client 100.100.100.100:53846] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdminindex.php
[Wed Nov 19 05:13:28.399779 2014] [authz_core:error] [pid 23773] [client 100.100.100.100:53846] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdminerror
[Wed Nov 19 05:13:28.487445 2014] [authz_core:error] [pid 23773] [client 100.100.100.100:53846] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdminfavicon.ico
[Wed Nov 19 06:56:15.012981 2014] [authz_core:error] [pid 25373] [client 100.100.100.100:55403] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdmin/
[Wed Nov 19 06:56:45.498809 2014] [authz_core:error] [pid 25376] [client 100.100.100.100:55405] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdmin/
[Wed Nov 19 06:56:52.390850 2014] [authz_core:error] [pid 25408] [client 100.100.100.100:55407] AH01630: client denied by server configuration: /usr/share/webapps/phpMyAdmin/

The virtualhost is given below:

    <VirtualHost *:80>
        ServerAdmin support@domain.com
        DocumentRoot "/usr/share/webapps/phpMyAdmin/"
        ServerName phpmyadmin.domain.com
        ServerAlias www.phpmyadmin.domain.com
        ErrorLog "/var/log/httpd/phpmyadmin.domain.com-error_log"
        CustomLog "/var/log/httpd/phpmyadmin.domain.com-access_log" common
        Redirect permanent / https://phpmyadmin.domain.com
    </VirtualHost>
     
    <VirtualHost *:443>
        ServerAdmin support@domain.com
        DocumentRoot "/srv/http/domain.com-phpmyadmin"
        ServerName phpmyadmin.domain.com
        ServerAlias www.phpmyadmin.domain.com
        ErrorLog "/var/log/httpd/phpmyadmin.domain.com-error_log"
        CustomLog "/var/log/httpd/phpmyadmin.domain.com-access_log" common
        <Directory "/srv/http/domain.com-phpmyadmin">
            DirectoryIndex index.html index.php
            AllowOverride All
            Options FollowSymlinks
            Require all granted
        </Directory>
    </VirtualHost>

Thanks for taking the time to read this. I am really starting to get annoyed by this, so any help is appreciated!

Last edited by rekahsoft (2014-12-07 02:17:29)

Offline

#2 2014-11-19 20:03:07

ackt1c
Banned
From: Visalia, California
Registered: 2012-10-10
Posts: 241

Re: phpmyadmin apache subdomain [SOLVED]

Closed

Last edited by ackt1c (2022-11-05 13:47:40)

Offline

#3 2014-11-20 02:38:53

rekahsoft
Member
Registered: 2010-07-18
Posts: 33
Website

Re: phpmyadmin apache subdomain [SOLVED]

Thanks for the reply..though its not exacly what I want..that is, to be able to access it on a subdomain "phpmyadmin.domain.com" without any extra path..I can use an alias to do what you mention here (see archwiki for phpmyadmin under apache configuration). Still looking for a solution.

Last edited by rekahsoft (2014-11-20 02:39:13)

Offline

#4 2014-11-21 00:40:27

ackt1c
Banned
From: Visalia, California
Registered: 2012-10-10
Posts: 241

Re: phpmyadmin apache subdomain [SOLVED]

Block

Last edited by ackt1c (2022-11-05 13:42:58)

Offline

#5 2014-11-24 07:22:29

rekahsoft
Member
Registered: 2010-07-18
Posts: 33
Website

Re: phpmyadmin apache subdomain [SOLVED]

No that can't be it, because it is pointed at /srv/http/domain.com-phpmyadmin which is a symlink to /usr/share/webapps/phpMyAdmin. Sorry I should have mentioned that in my original post.

Anyways both the http and https phpmyadmin.domain.com work (you see the login when you go to them); but
when I log in (using either http or https) instead of going to:

phpmyadmin.domain.com/index.php/?token=...

It goes to

phpmyadmin.domain.comindex.php/?token=...

Note the missing trailing slash after phpmyadmin.domain.com. This is not a typo, phpmyadmin is redirecting me to a malformed url upon login.

Now, after logging in and being redirected an invalid url, if I go to phpmyadmin subdomain again (phpmyadmin.domain.com using the same protocol as used above) I will be at a fully functional phpmyadmin (assuming I typed the loggin credentials correctly above).

Anyways hopefully this was more clear. Thanks for the help smile

Offline

#6 2014-11-24 09:30:37

progandy
Member
Registered: 2012-05-17
Posts: 5,280

Re: phpmyadmin apache subdomain [SOLVED]

I believe you'll have to add a slash at the end of the URL in your Redirecct permanent directive.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2014-11-25 00:05:57

rekahsoft
Member
Registered: 2010-07-18
Posts: 33
Website

Re: phpmyadmin apache subdomain [SOLVED]

progandy wrote:

I believe you'll have to add a slash at the end of the URL in your Redirecct permanent directive.

OMG you're the [wo]man smile Weird because with my other subdomains I do the same thing without issues. Fixed the problem thought smile The thing that is a little confusing is that it happens when I go to the https version from the beginning yet it still does a redirect (and thus attempts to use http for the login?).

Thanks again smile

Offline

#8 2014-11-25 07:15:29

progandy
Member
Registered: 2012-05-17
Posts: 5,280

Re: phpmyadmin apache subdomain [SOLVED]

Maybe try ForceSSL, too: http://docs.phpmyadmin.net/en/latest/co … g_ForceSSL

Last edited by progandy (2014-11-25 07:15:52)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB