<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Arial">We are here discussing two different things... one
is Asterisk GUI for a x86 server with 512MB RAM or more and a decent
Pentium/Xeon/Opteron or like CPU. Other is a embedded uCLinux.<br>
Of course Apache is better as a web server, but should it be used in a
32 MB RAM board??????<br>
</font><br>
Dome Charoenyost escreveu:
<blockquote
cite="mid8ccbff060703282026i3d2d72ctfc3dca0a7e16559d@mail.gmail.com"
type="cite">In WRT54GL with openwrt we have 4 MB flash ,16 MB Ram 200
Mhz mipsel cpu.
<br>
Only kernel , busybox and Asterisk (not full) can install.
<br>
So in this case root is important
<br>
<br>
Dome C.
<br>
<br>
<br>
On 3/29/07, Tzafrir Cohen <a class="moz-txt-link-rfc2396E" href="mailto:tzafrir.cohen@xorcom.com"><tzafrir.cohen@xorcom.com></a> wrote:
<br>
<blockquote type="cite">On Thu, Mar 29, 2007 at 12:13:36AM +0700,
Dome Charoenyost wrote:
<br>
> root is ok because it's embeded.
<br>
<br>
No. Root is not OK. Why should Asterisk be serving static files anyway?
<br>
It does a bad job at this. You don't even have decent access and error
<br>
logs.
<br>
<br>
So the next set would be to set 'enablestatic=no'
<br>
<br>
Let's use the bad-old apache to handle everything. Apache has a
<br>
well-known mod_proxy. It has su_exec, it has directory listing (when
you
<br>
enable it) and decent logging facilities. So we'll let it server static
<br>
content and proxy the manager content.
<br>
<br>
System:
<br>
boomtime, a.k.a. tzafrir_laptop's laptop. Debian Etch with some
<br>
experimental asterisk packages (1.4.2, and asterisk-gui).
<br>
<br>
1. apt-get install lighttpd
<br>
<br>
2. configure the manager access properly:
<br>
<br>
;;;;;;;;;;;;;;;;;;;;;;;;
<br>
;;;;;;;;;;;;;;;;;;;;;;;; /etc/asterisk/manager.conf:
<br>
;;;;;;;;;;;;;;;;;;;;;;;;
<br>
[general]
<br>
enabled = yes
<br>
webenabled = yes
<br>
port = 5038
<br>
;bindaddr = 127.0.0.1
<br>
<br>
[tzafrir]
<br>
secret = xxxxxxxxxxxxxxxxxxxxxxxxx
<br>
;deny=0.0.0.0/0.0.0.0
<br>
;permit=209.16.236.73/255.255.255.0
<br>
; Authorization for various classes
<br>
read = system,call,log,verbose,command,agent,user,config
<br>
write = system,call,log,verbose,command,agent,user,config
<br>
<br>
;;;;;;;;;;;;;;;;;;;;;;;;
<br>
;;;;;;;;;;;;;;;;;;;;;;;; /etc/asterisk/http.conf:
<br>
;;;;;;;;;;;;;;;;;;;;;;;;
<br>
<br>
[general]
<br>
enabled=yes
<br>
enablestatic=no
<br>
; Are those necessary?
<br>
bindaddr=127.0.0.1
<br>
bindport=8088
<br>
<br>
3. Restart asterisk Check
<br>
<br>
Sanity check:
<br>
<a class="moz-txt-link-freetext" href="http://localhost:8088/asterisk/rawman?action=login">http://localhost:8088/asterisk/rawman?action=login</a>
<br>
<br>
and you should get:
<br>
<br>
Response: Error
<br>
Message: Authentication failed
<br>
<br>
This means that the manager is listening on port 8088 .
<br>
<br>
On to configure apache.
<br>
<br>
In Debian the data dir is /usr/share/asterisk, and is separate from the
<br>
varlibdir . The datadir contains files that should be read-only. If
<br>
you're into building a small system, keeping this separation may be a
<br>
good idea, as it allows you to keep the bulk of the Asterisk files on a
<br>
read-only media or at least know that it should not be changed.
<br>
<br>
<br>
<br>
The static-http files sit under /usr/share/asterisk/static-http .
<br>
<br>
4. Install apache:
<br>
# Install the package:
<br>
apt-get install apache2
<br>
# enable some module (debian-specific script)
<br>
a2enmod proxy_http rewrite
<br>
/etc/init.d/apache2 force-reload
<br>
<br>
Check that apache2 is installed:
<br>
<br>
<a class="moz-txt-link-freetext" href="http://localhost/">http://localhost/</a>
<br>
<br>
should redirect you to:
<br>
<br>
<a class="moz-txt-link-freetext" href="http://localhost/apache2-default/">http://localhost/apache2-default/</a>
<br>
<br>
which says just:
<br>
<br>
It works!
<br>
<br>
<br>
5. Now let's redirect /asterisk/manager* from port 8088
<br>
<br>
######################
<br>
###################### /etc/apache2/conf.d/asterisk
<br>
###################### (take 1)
<br>
######################
<br>
ProxyPass /asterisk/rawman <a class="moz-txt-link-freetext" href="http://localhost:8088/asterisk/rawman">http://localhost:8088/asterisk/rawman</a>
<br>
ProxyPassReverse /asterisk/rawman <a class="moz-txt-link-freetext" href="http://localhost:8088/asterisk/rawman">http://localhost:8088/asterisk/rawman</a>
<br>
<br>
<LocationMatch /asterisk/rawman*>
<br>
Allow from all
<br>
</LocationMatch>
<br>
<br>
<br>
Now let's try again to "login" to the manager. This time, through
apache:
<br>
<br>
<a class="moz-txt-link-freetext" href="http://localhost/asterisk/rawman?action=login">http://localhost/asterisk/rawman?action=login</a>
<br>
<br>
<br>
6. Let's add in the static files:
<br>
<br>
######################
<br>
###################### /etc/apache2/conf.d/asterisk
<br>
###################### (full version)
<br>
######################
<br>
ProxyPass /asterisk/rawman <a class="moz-txt-link-freetext" href="http://localhost:8088/asterisk/rawman">http://localhost:8088/asterisk/rawman</a>
<br>
ProxyPassReverse /asterisk/rawman <a class="moz-txt-link-freetext" href="http://localhost:8088/asterisk/rawman">http://localhost:8088/asterisk/rawman</a>
<br>
<br>
<LocationMatch /asterisk/rawman*>
<br>
Allow from all
<br>
</LocationMatch>
<br>
<br>
Alias /asterisk/static /usr/share/asterisk/static-http
<br>
<Directory /usr/share/asterisk/static-http>
<br>
Options indexes
<br>
</Directory>
<br>
<br>
--
<br>
Tzafrir Cohen
<br>
icq#16849755 <a class="moz-txt-link-abbreviated" href="mailto:jabber:tzafrir@jabber.org">jabber:tzafrir@jabber.org</a>
<br>
+972-50-7952406 <a class="moz-txt-link-freetext" href="mailto:tzafrir.cohen@xorcom.com">mailto:tzafrir.cohen@xorcom.com</a>
<br>
<a class="moz-txt-link-freetext" href="http://www.xorcom.com">http://www.xorcom.com</a> <a class="moz-txt-link-abbreviated" href="mailto:iax:guest@local.xorcom.com/tzafrir">iax:guest@local.xorcom.com/tzafrir</a>
<br>
_______________________________________________
<br>
--Bandwidth and Colocation provided by Easynews.com --
<br>
<br>
asterisk-gui mailing list
<br>
To UNSUBSCRIBE or update options visit:
<br>
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-gui">http://lists.digium.com/mailman/listinfo/asterisk-gui</a>
<br>
<br>
</blockquote>
_______________________________________________
<br>
--Bandwidth and Colocation provided by Easynews.com --
<br>
<br>
asterisk-gui mailing list
<br>
To UNSUBSCRIBE or update options visit:
<br>
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-gui">http://lists.digium.com/mailman/listinfo/asterisk-gui</a>
<br>
</blockquote>
</body>
</html>