uhttpd config, index file, php vs. html

Maybe too late but for everyone, I have The same problem and fix it.
If you need in webserver "uhttpd" run together html and php index :wink:
Here is oficial man: Web Server Configuration (uHTTPd) [Old OpenWrt Wiki]
Speed tutorial:

  • Must install PHP5:
    opkg update
    opkg install php5 php5-cgi

  • Must edit uhttpd config file
    vi /etc/config/uhttpd
    now must add 3 rows (lines)[without number & colon]:
    1:list interpreter '.php=/usr/bin/php-cgi'
    2:list index_page 'index.html, default.html, index.php'
    3:option index_file 'index.html, default.html, index.php'

  • And now just only restart uhttpd server:
    /etc/init.d/uhttpd restart

  • If you want can you control it:
    uci show uhttpd
    When you will see in uci list this 3 lines as:
    uhttpd.main.interpreter='.php=/usr/bin/php-cgi'
    uhttpd.main.index_page='index.html, default.html, index.php'
    uhttpd.main.index_file='index.html, default.html, index.php'

You're a winner :slight_smile: