OpenWrt Forum Archive

Topic: Install and configure lighttpd proxy server (Tutorial)

The content of this topic has been archived on 3 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,
I tried many proxy servers but they didn't work properly with https so I decided to test lighttpd proxy and after installing and configuring it, it worked well with http and https

I downloaded the packages and transferred them to /tmp directory and I installed them

opkg install lighttpd_1.4.36-1_ramips_24kec.ipk
opkg install lighttpd-mod-proxy_1.4.36-1_ramips_24kec.ipk

Make sure to edit  "/etc/lighttpd/lighttpd.conf"
change
#server.port = 80
to
server.port = 81

Add The following lines to the file "/etc/lighttpd/conf.d/proxy.conf"

$HTTP["host"] != "" {
proxy.server = ( "" =>
((
"host" => "192.168.1.1",  #Router IP
"port" => 81 ))
)
}

/etc/init.d/lighttpd restart

Now it is ready to use the proxy 192.168.1.1:81
I also suggest to reboot the router after that

This worked on my router, if someone is interested to test it I will be happy to know the result of your test.

(Last edited by MikeZak on 27 Aug 2016, 14:46)

Be so kind to move this [HowTo] into the appropriate forum (Community Documentation).

N.B. - many thanks for the 'giveback'

What does the code do? It redirects every request to port 80 to port 81? Why? What is in the port 81? Is lighttpd both in ports 80 and 81? When should one do this, and what does he gain by it?

The discussion might have continued from here.