OpenWrt Forum Archive

Topic: uhttpd config

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

Hi,

     I want to run a web page inside my fresh OpenWRT. I have the configuration below. I put my files into the /www folder.

     When I try to open the web page via browser, I get the LUCI interface pops up.

     How should I modify my config file to see my custom web page ?


root@OpenWrt:/# cat /etc/config/uhttpd
config uhttpd 'main'
        list listen_http '0.0.0.0:80'
        list listen_http '[::]:80'
        list listen_https '0.0.0.0:443'
        list listen_https '[::]:443'
        option redirect_https '1'
        option home '/www'
        option rfc1918_filter '1'
        option max_requests '3'
        option max_connections '100'
        option cert '/etc/uhttpd.crt'
        option key '/etc/uhttpd.key'
        option cgi_prefix '/cgi-bin'
        option script_timeout '60'
        option network_timeout '30'
        option http_keepalive '20'
        option tcp_keepalive '1'
        option ubus_prefix '/ubus'

config cert 'px5g'
        option days '730'

        option network_timeout '30'
        option http_keepalive '20'
        option tcp_keepalive '1'
        option ubus_prefix '/ubus'

config cert 'px5g'
        option days '730'
        option bits '1024'
        option country 'ZZ'
        option state 'Somewhere'
        option location 'Uknown'
        option commonname 'OpenWrt'

Which files have you put into www folder? Which link do you type in web-browser?

I type "192.168.1.1" and the LUCI shows up.

if I type "192.168.1.1/index.php", I can reach my web page.

Modify the 'index.html' page in your '/www' folder. There's a redirect statement on that page which takes you to the LuCI main page.

I deleted the index.html but still it starts LUCI.

Even if it resolves my problem, it does not resolve it properly. I need to delete the index.html when I compile from source. When I compile the source the index.html should not be on the /www folder. How can I arrange it ?

Your browser has cached the old index.html.  Clear the browser cache.

If you don't want LuCI don't compile it in.

The discussion might have continued from here.