OpenWrt Forum Archive

Topic: How to run LuCI with Apache ?

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

BARRIER BREAKER (Bleeding Edge, r37759)

Can i run LuCI on web server Apache ?

I need help on how to do it, I've been searching the forum and Google but i cannot find an article on how to combine the two together. All i can find is this but they don't explain how to use the most popular server in the world Apache! :

http://wiki.openwrt.org/doc/howto/luci.essentials

LuCI on other web servers
http://wiki.openwrt.org/doc/howto/http.overview →http.overview

LuCI on lighttpd
http://wiki.openwrt.org/doc/howto/luci.on.lighttpd →luci.on.lighttpd

LuCI on nginx
http://wiki.openwrt.org/doc/howto/luci.on.nginx →luci.on.nginx

LuCI on ...


My main objective is to run a server on port 80 and the web user interface (LuCI) to administer the router on a different port.

Installed:
Apache
PHP
MySQL

LuCI is not installed on the router.

Set up a LAMP stack on OpenWrt:
http://wiki.openwrt.org/doc/howto/lamp

I am unable to access my router index.php test file from http://192.168.1.1/index.php

(Last edited by bcus on 16 Aug 2013, 10:00)

I assume that you need to mirror the advice given in the lighttpd regarding cgi.
http://wiki.openwrt.org/doc/howto/luci.on.lighttpd
> ... Now we need to tell lighttpd to process requests for the web interface using Lua. The LuCI administation package installs a file /cgi-bin/luci, which is the default CGI gateway for LuCI. This is a script (with shebang line) that can run LuCI independently and calls Lua by itself. To tell lighttpd that it needs to load everything starting with /cgi-bin/luci by that script simply add ...


So, you have to tell Apache to allow the cgi script from /cgi-bin/luci. I am not familiar with Apache, so this is pure guess ;-)

(You might also try directly to the script: 192.168.1.1/cgi-bin/luci , if the index.html does not contain the proper alias. )

I'd love to know answer too. I'm running arokh's build on wndr3700v1, and I want to run there some my websites running on apache and it is better to have only one web server instead of 2...(mainly because of conflits)

i havent had time to try things from lighttp server to apache.. i just dont understand why there's no howto on the internet or here on the wiki...maybe i am just looking on the wrong place but an advanced user could probably tell me why this havent been done yet.. memory space? ram size? no need for an http server to serve files over the internet?.. u dont know.

unfortunately, there is no howto about apache. I looked almost everywhere :-D

for anybody looking for this answer, your best bet, is to give up .... move uhttpd to another port if you really want to keep the default web gui ....

the reason ? the version of apache available to us does not include anything to process the LUA hooks that luci uses .... so after you've setup apache to process the cgi etc, the GUI will not be able to 'complete' the requests, youll have boxes all over the place as placeholders for information, but not the actual information .... similar to an incorrect php setup ... building apache from the source will not change this either, possibly mod_lua was deliberately left out because it gives to much power over apache, and could potentially make other sites insecure if someone is crafty enough ... if your running hardware powerful enough to run apache MySQL etc, you wont notice the very little resources lost to uhttpd ....

PhSnake wrote:

I'd love to know answer too. I'm running arokh's build on wndr3700v1, and I want to run there some my websites running on apache and it is better to have only one web server instead of 2...(mainly because of conflits)

You also can run multiple instances (web sites) with default uHTTPd web server..No need for bloated Apache..

(Last edited by written_direcon on 14 May 2014, 07:14)

The discussion might have continued from here.