Page 1 of 1

Need basic web server SSL and password support??

Posted: Sun Jul 22, 2012 8:59 pm
by redhawk
I want to setup a web server on my PI I could install Apache but I want something small and less complicated and easy on the RAM to play with.
My only other 2 requirements are that it supports SSL (https) communications and has password authentication to prevent unauthorised snooping.
I found a program called thttpd which looked very promising unfortunately I cannot install it with "apt-get install thttpd" because it appears there are only i386 binaries available for download.
I might end up having to compile this myself (I hate doing this because nearly something always goes wrong) however in the meantime could anyone recommend me an alternative??

Richard S.

Re: Need basic web server SSL and password support??

Posted: Sun Jul 22, 2012 9:06 pm
by Julian
I heard lighttpd is a good alternative to apache (I have never used it tough). It has SSL and htaccess support and it is in the official debian wheezy repository so it should also be in the raspbian repository. You could also try nginx.

Re: Need basic web server SSL and password support??

Posted: Sun Jul 22, 2012 9:11 pm
by redhawk
just as I feared: :cry:
htpasswd.c:52:12: error: conflicting types for âgetlineâ
/usr/include/stdio.h:671:20: note: previous declaration of âgetlineâ was here
make[1]: *** [htpasswd.o] Error 1
make[1]: Leaving directory `/root/thttpd-2.25b/extras'
make: *** [subdirs] Error 2

Richard S.

Re: Need basic web server SSL and password support??

Posted: Sun Jul 22, 2012 9:19 pm
by chrisw2
Hi Richard,

You might have better luck trying to build a debian package "the smart way" see:

HowTo Build a Package from Source the Smart Way - http://forums.debian.net/viewtopic.php?f=16&t=38976

I recently built a dhttpd debian package this way.

Re: Need basic web server SSL and password support??

Posted: Sun Jul 22, 2012 10:01 pm
by Jim JKla
Or of course you could use Apache2 it does work. ;)

Re: Need basic web server SSL and password support??

Posted: Sun Jul 22, 2012 10:19 pm
by frak
What specific issues are you having with Apache that is forcing you to try another web server? You can reduce memory requirements a lot by disabling unneeded modules...

Re: Need basic web server SSL and password support??

Posted: Sun Jul 22, 2012 10:20 pm
by redhawk
I've found a .deb package complied for Ubuntu armhf, interestingly it installs and runs on the the PI - https://launchpad.net/ubuntu/precise/ar ... d/2.25b-11 :lol:
Not sure why the compiler is having problems compiler errors seems to be a regular occurrence for me and Linux.

Richard S.

Re: Need basic web server SSL and password support??

Posted: Sun Jul 22, 2012 10:23 pm
by redhawk
Nothing wrong with apache but it's quite a big package to install, thttpd on the other hand is smaller and fits my criteria for a lightweight compact web server.

Richard S.

Re: Need basic web server SSL and password support??

Posted: Sun Jul 22, 2012 10:25 pm
by frak
Fair enough, but in 12 years of web development it (Apache) has never done me wrong ;o)

Re: Need basic web server SSL and password support??

Posted: Sun Jul 22, 2012 11:23 pm
by redhawk
I've found the fault htpasswd.c needs editing and the function getline renamed to avoid conflicts i.e. get_line and all instances of getline in the this file, after that it compiles.
Unfortunately it doesn't appear to support SSL so I guess I'll be using Apache after all. :roll:

Richard S.