Koozali.org: home of the SME Server

Wap pages on SME

Offline arne

  • *****
  • 1,116
  • +0/-4
Wap pages on SME
« on: March 17, 2005, 12:50:01 AM »
Hello !

A few days ago I got the idea that it would be nice to host some wap pages on my sme 6.0.1 server.

Well, I just hacked in some wap code, made some wap pages, and published it in a subdirectory on my web server.

Using a wap client emulator on web, it works ok. Accessed from my Nokia telephone it does not work.

Looks like the Apache web server on the SME 6.0.1 does not support, in one way or the other the publication of wap content.

Does anybody has any information about this issue ?

(I think the wap format is not really very usable, but ok, I use a local weather forcast function, and also I think it would be nice to have telephone list and some other key information avaivalable from my home server.)
......

Offline arne

  • *****
  • 1,116
  • +0/-4
Wap pages on SME
« Reply #1 on: March 17, 2005, 01:04:03 PM »
Have found out about it. Only a few adjustments of the httpd.conf file required, that of cource has to be done in "the special e-smith way". I am in the middle of it now and think I will not need any help.
......

Offline wyron

  • *
  • 275
  • +0/-0
    • http://www.ideast.dk
Wap pages on SME
« Reply #2 on: March 17, 2005, 01:14:16 PM »
Quote
I am in the middle of it now and think I will not need any help

Fint nok, Arne, men andre kunne måske have nytte af en 'howto'.
Lad os høre lidt om dine erfaringer, når det 'spiller'.

Good for you, Arne, but perhaps a 'howto' would be useful for others.
Please do share your findings.
Greetings
wyron
...

Offline arne

  • *****
  • 1,116
  • +0/-4
Wap pages on SME
« Reply #3 on: March 17, 2005, 06:41:09 PM »
Yes /jo !

I have an extremely bad habit and that is to do the jobs without writing a word, and then if sombody ask me what I did do, I just don't know.

In this case it should not be to difficult to open the /etc/httpd.config file to find it again ..

By the way I fount the first part of the required information at the danish site linuxbog.dk in that book about Linux adimistration.

I think that the configuration advices did work while the program example did not work (??) So I took the configuration from the linuxbog.dk and the programming from here
http://www.wapdrive.com/DOCS/wml_tutorial/index.html

The Linuxbog.dk is down just now, so I cant check it, but I think this should be the right link:
http://www.linuxbog.dk/web/bog/wap-apache.html

And the I think that the info at the linkplace does not mention that you also have to define index.wml as an index file (in httpd.conf)
......

Offline arne

  • *****
  • 1,116
  • +0/-4
Wap pages on SME
« Reply #4 on: March 17, 2005, 06:52:43 PM »
DirectoryIndex index.htm index.html index.shtml index.cgi index.wml

AddType text/vnd.wap.wml     .wml

By the way this should be done by editing the config fragments in the e-smith way and not by just edditing the /etc/httpd.conf file.

Have not finished the job "the real way" yet, but it will be done.

By the way, I think it is a rather usable function to have a small wap area on the web server, a "wap home page" with weateher forecast, news and telephone numbers and info you like to have anywere.

The Opera web browser can read the wap pages so it is not neccesarely available only from the telephone.

The sme server seams to have no problems at all, hosting wap pages after some minor modifications.

(Why not make this as a default mod for the next sme revision ?)

Best reg arne, contribs.org / langbein, eksperten.dk
......

Offline arne

  • *****
  • 1,116
  • +0/-4
Wap pages on SME
« Reply #5 on: March 17, 2005, 07:40:40 PM »
Found some more info "out there" on the net. Mod of the /etc/httpd.conf file:

Mime types:

AddType text/vnd.wap.wml .wml
AddType Application/vnd.wap.wmlc .wmlc
AddType text/vnd.wap.vmlscript .wmls
AddType Application/vnd.wap.wmlscriptc .vmlsc
AddType image/vnd.wap.wbmp .wbmp

Directory indexes must recognise .wml too:
DirectoryIndex index.cgi index.htm index.html index.php index.wml

And don't forget to restart the server!
......

Offline arne

  • *****
  • 1,116
  • +0/-4
Wap pages on SME
« Reply #6 on: March 29, 2005, 01:40:58 AM »
OK, made it in the right "sme way", in the end, I hope:

1. Copy over the two modules

50DirectoryIndex01
75AddType00

from directory
/etc/e-smith/templates/etc/httpd/conf/httpd.conf
to directory
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
......

Offline arne

  • *****
  • 1,116
  • +0/-4
Wap pages on SME
« Reply #7 on: March 29, 2005, 01:45:23 AM »
edit the first template (50DirectoryIndex01):

DirectoryIndex index.htm index.html index.shtml index.cgi index.wml /ModIndex/index.html


Edit the second template (75AddType00):

AddType text/vnd.wap.wml .wml
AddType image/vnd.wap.wbmp .wbmp


Then expand the template:

/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
......

Offline arne

  • *****
  • 1,116
  • +0/-4
Wap pages on SME
« Reply #8 on: March 29, 2005, 02:05:43 AM »
Modified 2 ea SME 6.0.1 servers tonight to obtain wap support, using procedure as above. Seems to bee working ok.

Only one thing .. the web server must be rebooted before changes will take effect:

service httpd reboot
......