mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
busybox: enable and install webserver
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
f493283b60
commit
046434a0d8
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Busybox version: 1.18.4
|
||||
# Sun Apr 3 16:13:37 2011
|
||||
# Tue Apr 12 14:24:15 2011
|
||||
#
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
|
||||
@ -720,19 +720,19 @@ CONFIG_FTPGET=y
|
||||
CONFIG_FTPPUT=y
|
||||
CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y
|
||||
CONFIG_HOSTNAME=y
|
||||
# CONFIG_HTTPD is not set
|
||||
# CONFIG_FEATURE_HTTPD_RANGES is not set
|
||||
# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
|
||||
# CONFIG_FEATURE_HTTPD_SETUID is not set
|
||||
# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
|
||||
# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
|
||||
# CONFIG_FEATURE_HTTPD_CGI is not set
|
||||
# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
|
||||
# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
|
||||
# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
|
||||
# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
|
||||
# CONFIG_FEATURE_HTTPD_PROXY is not set
|
||||
# CONFIG_FEATURE_HTTPD_GZIP is not set
|
||||
CONFIG_HTTPD=y
|
||||
CONFIG_FEATURE_HTTPD_RANGES=y
|
||||
CONFIG_FEATURE_HTTPD_USE_SENDFILE=y
|
||||
CONFIG_FEATURE_HTTPD_SETUID=y
|
||||
CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
|
||||
CONFIG_FEATURE_HTTPD_AUTH_MD5=y
|
||||
CONFIG_FEATURE_HTTPD_CGI=y
|
||||
CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
|
||||
CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
|
||||
CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
|
||||
CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
|
||||
CONFIG_FEATURE_HTTPD_PROXY=y
|
||||
CONFIG_FEATURE_HTTPD_GZIP=y
|
||||
CONFIG_IFCONFIG=y
|
||||
CONFIG_FEATURE_IFCONFIG_STATUS=y
|
||||
# CONFIG_FEATURE_IFCONFIG_SLIP is not set
|
||||
|
46
packages/sysutils/busybox/config/httpd.conf
Normal file
46
packages/sysutils/busybox/config/httpd.conf
Normal file
@ -0,0 +1,46 @@
|
||||
# httpd.conf has the following format:
|
||||
#
|
||||
# H:/serverroot # define the server root. It will override -h
|
||||
# A:172.20. # Allow address from 172.20.0.0/16
|
||||
# A:10.0.0.0/25 # Allow any address from 10.0.0.0-10.0.0.127
|
||||
# A:10.0.0.0/255.255.255.128 # Allow any address that previous set
|
||||
# A:127.0.0.1 # Allow local loopback connections
|
||||
# D:* # Deny from other IP connections
|
||||
# E404:/path/e404.html # /path/e404.html is the 404 (not found) error page
|
||||
# I:index.html # Show index.html when a directory is requested
|
||||
#
|
||||
# P:/url:[http://]hostname[:port]/new/path
|
||||
# # When /urlXXXXXX is requested, reverse proxy
|
||||
# # it to http://hostname[:port]/new/pathXXXXXX
|
||||
#
|
||||
# /cgi-bin:foo:bar # Require user foo, pwd bar on urls starting with /cgi-bin/
|
||||
# /adm:admin:setup # Require user admin, pwd setup on urls starting with /adm/
|
||||
# /adm:toor:PaSsWd # or user toor, pwd PaSsWd on urls starting with /adm/
|
||||
# .au:audio/basic # additional mime type for audio.au files
|
||||
# *.php:/path/php # run xxx.php through an interpreter
|
||||
#
|
||||
# A/D may be as a/d or allow/deny - only first char matters.
|
||||
# Deny/Allow IP logic:
|
||||
# - Default is to allow all (Allow all (A:*) is a no-op).
|
||||
# - Deny rules take precedence over allow rules.
|
||||
# - "Deny all" rule (D:*) is applied last.
|
||||
#
|
||||
# Example:
|
||||
# 1. Allow only specified addresses
|
||||
# A:172.20 # Allow any address that begins with 172.20.
|
||||
# A:10.10. # Allow any address that begins with 10.10.
|
||||
# A:127.0.0.1 # Allow local loopback connections
|
||||
# D:* # Deny from other IP connections
|
||||
#
|
||||
# 2. Only deny specified addresses
|
||||
# D:1.2.3. # deny from 1.2.3.0 - 1.2.3.255
|
||||
# D:2.3.4. # deny from 2.3.4.0 - 2.3.4.255
|
||||
# A:* # (optional line added for clarity)
|
||||
#
|
||||
|
||||
H:/usr/www # define the server root. It will override -h
|
||||
A:* # Allow address from all ip's
|
||||
E404:/usr/www/error/404.html # /path/e404.html is the 404 (not found) error page
|
||||
I:index.html # Show index.html when a directory is requested
|
||||
|
||||
*.php:/usr/bin/php-cgi
|
29
packages/sysutils/busybox/init.d/55_httpd
Normal file
29
packages/sysutils/busybox/init.d/55_httpd
Normal file
@ -0,0 +1,29 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# start httpd daemon
|
||||
#
|
||||
# runlevels: openelec, textmode
|
||||
|
||||
(
|
||||
progress "Starting HTTP daemon"
|
||||
httpd -p 80
|
||||
)&
|
@ -44,6 +44,7 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw $USER_PASSWORD`"
|
||||
|
||||
mkdir -p $INSTALL/etc
|
||||
cp $PKG_DIR/config/profile $INSTALL/etc
|
||||
cp $PKG_DIR/config/httpd.conf $INSTALL/etc
|
||||
|
||||
# /etc/fstab is needed by...
|
||||
touch $INSTALL/etc/fstab
|
||||
@ -62,3 +63,10 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw $USER_PASSWORD`"
|
||||
|
||||
# add user modprobe.d dir
|
||||
mkdir -p $INSTALL/usr/config/modprobe.d
|
||||
|
||||
# add webroot
|
||||
mkdir -p $INSTALL/usr/www
|
||||
echo "It works" > $INSTALL/usr/www/index.html
|
||||
|
||||
mkdir -p $INSTALL/usr/www/error
|
||||
echo "404" > $INSTALL/usr/www/error/404.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user