i am running OpenWRT in a pc. I would like to have a local web server. How can i achieve that, please?
Local coffee-shop web-site in Wordpress? You should define what platform you need. Then search opkg list | grep what_i_need
and decide whether it is possible or not. Generally it is a BAD idea to run Web-server on your router.
if you have the openwrt webUI, you obviously already have one running ?
Look towards debian or fedora for beginner web serving needs.
I wonder what is your definition of "pro"
i have installed lighttpd and it runs in port 81. Here is the config:
server.document-root = "/srv/www/"
server.port = 81
I have created a test index.html and i can see it in the browser http://<IP_address>:81. So far so good.
for testing i would like to upload some files and make them available from the web server. I delete the index.html and upload the files in that folder. Then i am getting an error with 403 Forbidden
. The folder has the following items:
root@OpenWrt:/srv/www# ll
drwxr-xr-x 2 root root 4096 Sep 10 08:13 ./
drwxr-xr-x 4 root root 4096 Sep 10 08:05 ../
-rw-r--r-- 1 root root 48 Sep 10 08:13 index.html
-rw-r--r-- 1 root root 50331648 Sep 10 08:07 Debian12_x64_netinstall.iso
root@OpenWrt:/srv/www#
If you are trying to use the web server as a download page without any index.html, you need to enable this:
https://redmine.lighttpd.net/projects/lighttpd/wiki/Mod_dirlisting
As an alternative: I am using nginx on openwrt. Which is more flexible in case of special needs, i.e. throttling download speed etc. Quite useful in case of multiple concurrent users. Anyway, as already mentioned, it is a good idea, the setup of a web server first to do on real LINUX. To avoid the overhead to battle openwrt specialities. You might even then port your setup to openwrt, and wipe out all its specialities. I.e. just to configure nginx/httplight from /etc/nginx/httplight.conf directly.