Password Protect: /var/www/html

cjkeeme

Guru
Joined
Jun 18, 2008
Messages
203
Reaction score
0
I would like to password protect /var/www/html - the main web interface. This seemed like a no brainier to me and that all I would have to do is add this to /etc/pbx/httpdconf/pbx.conf:

Code:
#Password protect /var/www/html/
<Directory /var/www/html/>
AuthType Basic
AuthName "CW.pbx / Restricted Area"
AuthUserFile /usr/local/apache/passwd/wwwpasswd
Require user maint
</Directory>

So, I did this and it works great, but then I tested my inbound IVR and when I pressed any selection that transfers to an extension that extension would no longer ring. On the CLI it stated that the extension was busy and that there was congestion. So I commented out the above code and reload Apache and I was back in business.

Here is the congestion error:

Code:
[Jan 18 09:09:55] NOTICE[3263] chan_sip.c: Auto-congesting SIP/201-08823730
[Jan 18 09:09:55] VERBOSE[4317] logger.c: -- SIP/201-08823730 is circuit-busy
[Jan 18 09:09:55] VERBOSE[4317] logger.c: == Everyone is busy/congested at this time (1:0/1/0)

Also, in the CLI I was seeing this many times:

Code:
[Jan 18 09:09:56] VERBOSE[4317] logger.c: -- Executing [s@macro-user-callerid:20] NoOp("SIP/cjke_001-b7d0a948", "Using CallerID "<!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN>
<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
<hr>
<address>Apache/2.2.3 (CentOS) Server at localhost Port 80</address>

It seems that the caller ID is calling on the main interface as it is in the directory /var/www/html which is now protected and stopping the call from going through. I still want to password protect the main web interface. What is the proper way of doing so?

EDIT: I re-inserted the code into pbx.conf, restart apache, and removed my Caller ID lookup sources from inbound routes. Everything worked perfectly, but now I have no Caller ID. I was using klingon888 modified caller ID script.
 
Last edited by a moderator:
Well, as said I removed the Caller ID script. I tested the original "Caller ID Superfecta" with the same results. I suspect one of the lookup sources is causing problems.

If anyone has a solution to this it is much appreciated.


SOLVED: Well, this was any easy one to figure out. The steps to get CallerID Lookups working with /var/www/html being protected are the following:

1. Setup the protection in pbx.conf explained above.
2. Setup CallerID Lookups as detailed in the "CallerID Superfecta".
3. Setup 'username' and 'password' in the CallerID lookup section with the one used to get to /var/www/html.
4. All done.
 

Members online

No members online now.

Forum statistics

Threads
26,687
Messages
174,410
Members
20,257
Latest member
Dempan
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top