Forum Moderators: bakedjake

Message Too Old, No Replies

Can you boot yourself off cPanel?

My website survived mod_rewrite, but not cpanel?

         

berli

2:11 am on Jun 22, 2003 (gmt 0)

10+ Year Member



I went and made a lot of changes to my .htaccess file today and yesterday, and now I can't log into cPanel. I've checked and the .htaccess file appears to work properly. I can view html files on my site, and I've gone to wannabrowser and gleefully watched it 403 various spoofed u_a's. However, I can't login to cPanel or port :2082 -- I get a 401.

The odd thing is that I thought cPanel was sort of controlled by some different file, higher in the directory tree.

It's NOT my username and password, as I have successfully logged in via ftp and ssh several times today.

Sometimes cPanel flakes out for no reason, and that might be all it is, but if there is something in the .htaccess that could have caused it, then I'll fix it. It's a bit long to paste here, but the contents consist of:

temporary and permanent redirects
AddHandler server-parsed .html
hotlinking protection
www --> domain
blocks by user_agent (multiple lines)
block referrer iaea.org
block no referrer, no u_a

And then this:
# ban by IP
<Files ~ ".*">
order allow,deny
allow from all
deny from env=ban
</Files>

# Cyveillance
RewriteCond %{REMOTE_ADDR} ^63\.148\.99\.2(2[4-9]¦[34][0-9]¦5[0-5])$ [OR]
RewriteCond %{REMOTE_ADDR} ^63\.226\.3[34]\. [OR]
RewriteCond %{REMOTE_ADDR} ^63\.212\.171\.161$ [OR]
# Webcontent International
RewriteCond %{REMOTE_ADDR} ^65\.102\.12\.2(2[4-9]¦3[01])$ [OR]
RewriteCond %{REMOTE_ADDR} ^65\.102\.17\.(3[2-9]¦[4-6][0-9]¦7[0-1]¦8[89]¦9[0-5]$ [OR]
the previous line exceeds a standard terminal window line length at the $ - could this be a problem?
RewriteCond %{REMOTE_ADDR} ^65\.102\.23\.1(5[2-9]¦6[0-7])$
RewriteRule .* - [F,L]

and a few deny's

berli

2:36 am on Jun 22, 2003 (gmt 0)

10+ Year Member



Would adding this line help?

AuthPAM_Enabled off

I found that in another online forum, when they were talking about getting user authentication errors. But that was among with a whole set of user authentication commands for, say, password-protecting directories . . .

<edit>typoes...</edit>

jdMorgan

3:06 am on Jun 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



berli,

If you have an "alternate domain" redirect - (what you noted as: www --> domain), make sure that it excludes your server IP address, otherwise you will have redirection problems when you try to access your site by IP address, which is often the case with various control panels:


RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
RewriteCond %{HTTP_HOST} !^123\.45\.67\.89
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]

The second line prevents a redirect if your site is accessed by its IP address. This is also handy if you have DNS problems - you can log in directly by IP and bypass DNS.

Line length is not a problem; One of our august members has many (maybe all) of his UA exclusions on a single RewriteCond line.

HTH,
Jim

berli

3:58 am on Jun 22, 2003 (gmt 0)

10+ Year Member



Actually, I'm not aware that cPanel ever uses the IP address. However, I did try it. I even altered the line so 11\.22\.33\.44.* ends with a wildcard because I'm actually on a subdomain.

But it didn't work!

Clearly the problem must be somewhere else.

I've made no modifications to htpasswds or anything like that. :-/

(Plus, if that were the problem wouldn't I get a 301 error? I checked and I'm definately getting a 401 - user authentication required.)

berli

4:10 am on Jun 22, 2003 (gmt 0)

10+ Year Member



Hmmm, my webhost has some cryptic info about server upgrades on their home page, but with no date. The servers were upgraded on May 21st, so the message could be from then, but there is also something about getting new username/passwords from them if you can't log in.

(But my lusername and password still work for ftp and ssh!)

::sigh::

If I did this, I can't imagine how.

If they're responsible it won't be the first time, and probably not the last either . . .

jdMorgan

4:18 am on Jun 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



berli,

> I even altered the line so 11\.22\.33\.44.* ends with a wildcard

You don't need to add a wildcard - the original line was not end-anchored.

I've seen this 401 problem myself, and basically it was my .htaccess redirecting after cPanel redirected to my IP address, and then it wanted me to log in again, etc. - sort of a big loop. The code I posted fixed it, but your problem must be different.

I can only suggest you comment out your most recent changes, and see if anything improves.

Jim

berli

4:56 am on Jun 22, 2003 (gmt 0)

10+ Year Member



Nope!

I tried commenting out various blocks. No dice. I then tried sending a blank .htaccess file. No change whatsoever.

I'm going to throw up my hands and decide it's not my fault. (After all, I made most of the major changes yesterday and had no trouble logging in then.)

Now I get to wait around for a week, for it to fix itself, or for me to get annoyed enough to actually try to get some help from my webhosts. (They rarely fix anything. If you can reach them at all, it's "why would you want that?")

Thanks for all the help, though, jdMorgan. At least I understand mod_rewrite a little bit better now . . .

berli

7:33 pm on Jun 23, 2003 (gmt 0)

10+ Year Member



I have access today. Looks like it was definately my hosting provider, not me dabbling in mod_rewrite. Thanks for the help and hints, though. I'm feeling a lot better about this apache voodoo business. :^)