Page 1 of 1

V17 - unable to log in to admin page

Posted: Sat Apr 07, 2018 12:34 pm
by danb35
For a while, I was running my web server at home, and had Meteotemplate installed on it. All was good. My home network was 192.168.1.0/24, $adminIPs was set to '192.168.1', I could log in to the admin page from home, but not from anywhere else.

A couple of months ago, I moved my server to a remote VPS. It's now on its own public IP, with a VPN connection to my home network. The VPN subnet is 192.168.3.0/24. So I updated $adminIPs to '192.168.1,192.168.3'. No dice--I get "Unauthorized access" when I try to log on.

OK, maybe the connection is being seen as coming from my home public IP, so I added that as well: '192.168.1,192.168.3,$HOME_IP'. Still no dice.

Finally, I set $enableAdminIP to false and set $adminIPs to ''. Still the same error.

I'm stumped here. A number of my blocks are pretty out-of-date, I'm sure. Where should I be looking to fix this?

Re: V17 - unable to log in to admin page

Posted: Sat Apr 07, 2018 9:11 pm
by Jachym
Hi,
look inside config.php - thats where the adminIPs are saved as well as your admin password. For the IPs, if you want to use a wild card use *

Re: V17 - unable to log in to admin page

Posted: Sun Apr 08, 2018 11:23 am
by danb35
Jachym wrote: Sat Apr 07, 2018 9:11 pm look inside config.php
I did; that's what I was editing. I hadn't tried * for adminIPs, but I wouldn't think with $enableAdminIP set to false that it should matter. But nonetheless, I changed $adminIPs to '*' and left $enableAdminIP set to false. Same result, "Unauthorized access". I then changed $enableAdminIP to true. Still the same result. As a side note, it'd be really helpful if the "Unauthorized access" message said why the access was unauthorized--wrong IP, bad password, something else? I'm assuming it's an IP-related issue, since I didn't see it before the move, but nothing is actually telling me that.

The only thing in my server logs about the attempt is this:

Code: Select all

(home IP) - - [08/Apr/2018:07:15:17 -0400] "GET /wx2/template/admin/login.php HTTP/1.1" 200 1135
(home IP) - - [08/Apr/2018:07:15:28 -0400] "POST /wx2/template/admin/authorize.php HTTP/1.1" 200 19

Re: V17 - unable to log in to admin page

Posted: Sun Apr 08, 2018 5:15 pm
by Jachym
Email me your admin password, page URL and config.php in your template root folder

Re: V17 - unable to log in to admin page

Posted: Sun Apr 08, 2018 6:38 pm
by danb35
Well, don't I feel silly... For some reason I can't fathom, I had two copies of config.php, one in /template/, and one in the root directory. I was editing the copy in the root directory, and the template was (not surprisingly) using the one in /template/. $adminIPs updated to include the correct IP, and I can now access the admin page. Problem solved, other than to figure out why I had that second copy to begin with.