OpenWrt Forum Archive

Topic: Luci behind a reverse proxy

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

Hi again,

I look for an how to or informations on google, wiki and this forum but still no clue.
I want to get access to Luci gui from a reverse proxy. But not from OpenWRT itself. I have a webserver already with all my applications inside a LemonLDAP portal (using yunohost if some are interested, good project for getting his services at home)

As I say in my previous post, I'm coming from DDWRT, this was possible with their gui (with a rewrite rule and reverse)
With Luci I get "The requested URL /cgi-bin/luci was not found on this server." that's not good, few time I get I get issue to solve because it's more than the application is not "ready" for reverse.

Is it possible to get Luci working from an external reverse proxy ? Or with an other web gui if there is.

Thanks

I don't see why not - nothing in the gui code cares whether it runs behind a proxy or not.

As jow said it is possible, but what do you mean by application not ready?
I think there is something not setup right with the reverse proxy in this case, because when most reverse proxies can't reach the upstream server, it will give a 500 error bad gateway.

Hi,

Code don't care about proxy, that's right.
But I know that depend on how the application is done, I have 2 ways usualy to get it inside an apache reverse proxy :

-application is 'ready' for reverse : there is a "webroot" or other type of parameter that make it possible to run from a directory so you reverse apache/app to myapp:9999/app
-you don't have this and so you use a rewrite at same time that reverse from a Location setting

But sometimes you have an application that's using hard coded redirection for exemple (the authentification one is the most naughty, I get it with Shinken and Foreman)
That's why I get an issue with "/cgi-bin/luci" but I'm not able to fix it.
So if any one as done it before coz I didn't find any clue to it (make it better to access all applications from the same portal and so I don't have to open OpenWRT access from the world as my "portal" have access)

The discussion might have continued from here.