How start lighttpd, sorry newbie hehehe
create a basic lighttpd.conf file like:
server.port = 8080
server.document-root = "/sdcard/docs"
server.upload-dirs = ( "/data/data/com.termux/files/usr/tmp" )
index-file.names = ( "index.html" )
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".css" => "text/css",
".js" => "application/x-javascript",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".gif" => "image/gif",
".png" => "image/png",
"" => "application/octet-stream"
)
Replace the server.document-root property with whichever directory you want to serve.
Then, start lighttpd -f lighttpd.conf. You can access your server at localhost:8080 now.
i'll try bro :)
what if the error can be no such file or directory?
I assume that you save the file as lighttpd.conf
If you save it with another name, use lighttpd -f <your config filename>
Replace your config filename with the name of the actual file you saved your config in.
I mean how do I install lighttpd and how to configure once installed?
apt install lighttpd
continue ?
and then just follow my initial replies
thanks i will try
Error this bro :
$ lighttpd -f lighttpd.conf
2017-03-21 00:21:30: (/home/fornwall/.termux-build/lighttpd/src/src/configfile.c.1186) opening configfile lighttpd.conf failed: No such file or directory
You need to create and save a lighttpd.conf file with the content from my 1st reply.
where to save file lighttpd.conf bro ?
@apolbox-project I'm closing this as it's not really a Termux issue. I think the best forum to discuss and get help with lighttpd is the dedicated forum for it at https://redmine.lighttpd.net/projects/lighttpd/boards/2.
There is also a Termux Google+ community at https://termux.com/community where you can get help!
Most helpful comment
create a basic lighttpd.conf file like:
Replace the
server.document-rootproperty with whichever directory you want to serve.Then, start
lighttpd -f lighttpd.conf. You can access your server atlocalhost:8080now.