Trouble configuring apache webserver

Hello,

I am new to openwrt and i would like to install an apache webserver with drupal and phpmyadmin for my home project. We want it like this our router has our drupal website on a usbstick and people that are connected to the router can reach the drupal website via. ip:port, thats our goal.

We stumbled across this guide https://openwrt.org/docs/guide-user/services/webserver/http.apache? we followed the guide but we cant reach the webserver after following the first steps(we installed it on the router). We edited the config to Listen 127.0.0.1:81 and to the ip from the router 192.168.8.1:81 but we still can't reach the page.

we also started it with apachectl start.Im using a GL-AR300M.

What is the output of the following command?

netstat -lnp | grep 81

Use preformatted text when posting console output (the </> button).

What i did:

i changed the config file and edited the Listen line to:

Listen 127.0.0.1:81

and in the bash shell i wrote:

apachectl start
netstat -lnp | grep 81

and netstat gave me following output.

tcp        0      0 127.0.0.1:81            0.0.0.0:*               LISTEN      28638/httpd

The router cannot respond if you allow only the localhost interface. In the instructions it is mentioned to let it listen to 192.168.1.1 (or whatever you have in your lan).

so my config now has

Listen 192.168.8.1:81
Listen 127.0.0.1:81

netstat output:

tcp        9      0 192.168.8.1:81          0.0.0.0:*               LISTEN      4612/httpd
tcp        0      0 127.0.0.1:81            0.0.0.0:*               LISTEN      4612/httpd

do i have to forward a port or change something in the firewall ?

We are clueless at the moment.

No, by default the LAN zone allows all incoming traffic. Make sure you didn't change that.

So we have reseted our router and we can ping the apache webserver but we can't open it on a browser unknown

You can ping an IP address, not a web server.
You should check your logs why the server is not opening in a browser.
Make sure you use the special port 81 when you enter the address in the browser.

i tested it with 192.168.8.1:81/ on chrome and firefox.

So we have a fritzbox router and our GL-AR300M and our GL-AR300M takes the internet from the fritzbox router (so it might inherit the settings) can this be the cause of the problem ?.

I'm pretty sure apache package on OpenWrt is currently broken. Check the issue tracker on github, for instance issue #4840. I don't know much about web servers, but there are other possibilities in OpenWrt (check docs).

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.