Go Down

Topic: Move config web (Read 2926 times) previous topic - next topic

KenNET

Hi,

Is is possible to move the default site (/cgi-bin/luci/webpanel/homepage) to another port, lat say :81

Then I want my webpages on the SD card on the "root" of webserver, not like now "192.168.1.100/sd/mypage.html", I want "192.168.1.100/mypage.html"

And last how do I install PHP on Yun?  I'm not that good with linux.

Thanks!

federicofissore

#1
Sep 26, 2013, 09:08 pm Last Edit: Sep 27, 2013, 09:01 am by Federico Fissore Reason: 1

Hi,

Is is possible to move the default site (/cgi-bin/luci/webpanel/homepage) to another port, lat say :81

Edit file /etc/config/uhttpd, 5th row
Code: [Select]
list listen_http 0.0.0.0:80

Quote

Then I want my webpages on the SD card on the "root" of webserver, not like now "192.168.1.100/sd/mypage.html", I want "192.168.1.100/mypage.html"

Change
Code: [Select]
option home /www accordingly. Beware that your files will be the only one served by the webserver (ie: you'll lose access to the webpanel).

Quote

And last how do I install PHP on Yun?  I'm not that good with linux.

Thanks!


Access the yun via ssh or via the YunSerialTerminal. Be sure it's properly configured to access the internet then type
Code: [Select]
opkg update
opkg install php5-cgi
(or php4 if you prefer)

PS: once you're done with uhttpd configuration, don't forget to restart it:
Code: [Select]
/etc/init.d/uhttpd restart

KenNET

Wow that was fast!

Ok I got PHP working

can I run multiple webservers? Yun admin on port 81, and my with pages from SD on port 80. How do I config that?


Thanks!

federicofissore

I'm not sure that's possible. uhttpd is made for very constrained environments. Maybe google can help

KenNET

I fond this and it works. Just put # on the original settings.

Code: [Select]


# Server configuration
config uhttpd main
    list listen_http    0.0.0.0:80
    option home        /www
    option cgi_prefix     /cgi-bin

config uhttpd secondary
    list listen_http    0.0.0.0:81
    option home        /mnt/sda1/arduino/www/
    option cgi_prefix     /cgi-bin

#


federicofissore

ah, well done. good to know :)

Go Up