Posted: Sat Sep 18, 2021 16:03 Post subject: DD-WRT and Lighttpd Setup
Hello all,
I'm calling this 'Advanced Networking' because I'll be blowed if I can work it out - please be gentle and use helpful words of one syllable if the answers are obvious to you, they aren't to me.
Background:
-Linksys 1900ACS running DD-WRT 3.0 + USB stick with Ext2+Swap partitions, the former mounted as /opt, Entware, Transmission, a few other minor tweaks. OpenVPN client when my daughter isn't winging about "It's stopping me from accessing my dodgy internet sites!"
-A fairly extensive home network including an ESXi server running 'a bunch of stuff', along with an eclectic range of computers both new and very old.
Issue:
I used to run a webserver from an ESXi VM but was getting more hacking attempts than I could be bothered to deal with so moved that to 'the cloud'. Still, it would be nice if I could host a backup page if/when the cloud service goes down. I could spin up another VM to do that but noticed under DD-WRT: Services: Lighttpd Webserver: Enable/disable...
Problem:
So I clicked 'enable', followed the provided local URL, no dice... fair enough, some setting up no doubt required, if only to have a place to put the web pages!
Much, much, searching later and I still have no clue beyond some seemingly confusing hits talking about other methods of setting up Lighttpd, Entware, messing with php & cgi - I'm a long way from that!
Questions:
1) So how do I set up / use the seemingly built in Lighttpd server?
-What to do beyond clicking 'enable'
-Where are the relevant .config files / directories?
-How do I choose where to put them? (ie under /opt)
2) Is there a published manual for DD-WRT to be found anywhere? I don't mean the wiki or any other hard to navigate or follow sources if you are not already an expert, I mean a manual where the UI options are laid-out with a brief explanation for the function of each as a jumping off point to further use/investigation.
Many thanks.
charlesmouse.
NB:
I realise this is my issue so don't go getting upset. I'm no fan of *NIX-based systems and so my 'expertise' only goes as far as things I couldn't avoid piking up.
Please keep in mind I absolutely don't consider myself a *NIX command-line 'wizard'. Where any kind advice is given, thank you, speak slowly and clearly without any assumptions.
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=326274 _________________ An old man said, “Erasers are made for those who make mistakes.” A youth replied, “Erasers are made for those who are willing to correct their mistakes!” Attitude matters! ~ Anonymous
----------
“You are always a student, never a master. You have to keep moving forward.” ~ Conrad Hall
----------
“Life is about moving on, accepting changes and looking forward to what makes you stronger and more complete.” ~ Anonymous
I had a similar expectation about the lighttpd built into dd-wrt. I have it disabled in the GUI and start lighttpd upon bootup via a script in:-
Administration -> Commands -> USB Script
The command I use is:-
Code:
lighttpd -f /opt/etc/lighttpd/lighttpd.conf
You can probably serve basic pages using just lighttpd, but if you want PHP or similar then you'll need to setup entware. If you don't want to use non-standard listening ports for lighttpd and to access dd-wrt's httpd then you can proxy from lighttpd to httpd with httpd listening on a non-standard port and serve specific urls from each web server, e.g.
Possibly I have struggled with finding answers to my difficulties because from my position of ignorance I don't know how to frame my questions. The answers I have found have been to a large extent over my head, and maybe not directly relevant - I have most assuredly looked for some considerable time before giving up and asking directly.
Something of a chicken and egg situation, hence my wondering if there is a manual for DD-WRT as a jumping off point. Also a manual to RTFM is an excellent resource for appreciating useful options and capabilities otherwise not considered. (Manuals and Reference books / Wikis are certainly not the same thing.)
As is often the case with these things "it's darkest before the dawn" so shortly after having finally given in after much fruitless struggle and asked for help I made some progress:
I found a particularly helpful guide which got me a good deal further toward my goals:
https://proprivacy.com/vpn/guides/dd-wrt
A highly recommended read for anyone starting with DD-WRT. But for the uninitiated like me, watch out! From what little I can tell some of the iptables 'magic spells' are not relevant/correct for all routers and DD-WRT installs - I suspect the nvram 'invocations' didn't play well with my WRT1900ACS
In a nut-shell the information I was 'missing' to use the built-in Lighttpd is one must have read/write access to jffs, my current /opt partition is not an option, at least within my scant understanding...
...So I pulled the USB stick I had previously set up with a /opt and /swap partitions for Entware and added a /jffs partition.
(A tip for anyone who doesn't use *NIX based systems - don't try this with any 'doze-based partition managers! I tried a few without success. Download the GParted live CD image, write to a USB stick, and use that. It's even got one of those fancy new-fangled GUI-thingummies and everything.)
Anyway, I now have my router largely as I want it:
-DD-WRT router + Large USB stick for read/write access
-Entware installed via an /opt partition
-Transmission running via a guide I found here
-Lighttpd running via a /jffs partition
-OpenVPN client up and running-ish via my VPN provider's guide*
*this last is giving me some unexpected trouble, again I suspect as a result of my ignorance, not knowing how to frame my questions, and what answers I have found either not being relevant or over my head. (firewall/iplists - good God in heaven! Is this really how we do things in 2021?)
I'm afraid as a result I'm going to have a lot more questions, please be patient!
P.S.
It's often the case that the best person to write a guide is the person who just worked it out - said guides tend to contain important information for the n00b that the knowledgeable have long-since stopped thinking of as information at all, important or otherwise.
Would it be helpful if I documented my progress so for (abbreviated of course) for any other new to DD-WRT users who may follow?
Thanks again your for answers to far. I really appreciate the time taken to reply even though most of them were over my head.
Joined: 08 May 2018 Posts: 14249 Location: Texas, USA
Posted: Mon Sep 20, 2021 11:47 Post subject:
charlesmouse wrote:
It's often the case that the best person to write a guide is the person who just worked it out - said guides tend to contain important information for the n00b that the knowledgeable have long-since stopped thinking of as information at all, important or otherwise.
Would it be helpful if I documented my progress so for (abbreviated of course) for any other new to DD-WRT users who may follow?
I couldn't agree with you more. I have specific comments I could make to shed light on this, but I shall not for the sake of proper etiquette and decorum. Please do document it, and at some point, the information could be added to the wiki. _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net