Commit 3fa4856d authored by Ad Schellevis's avatar Ad Schellevis

(captiveportal, new) add lighttpd config for passing access api to CP zones

parent 3b420133
#rc.conf.d:/etc/rc.conf.d/captiveportal
captiveportal.conf:/usr/local/etc/captiveportal.conf
lighttpd-api-dispatcher.conf:/var/etc/lighttpd-api-dispatcher.conf
#
# lighttpd configuration file for captiveportal API access (used by proxy pass on every zone, only accessible via localhost)
#
############ Options you really have to take care of ####################
## FreeBSD!
server.event-handler = "freebsd-kqueue"
server.network-backend = "writev"
#server.use-ipv6 = "enable"
## modules to load
server.modules = ( "mod_access", "mod_expire", "mod_compress", "mod_redirect",
,"mod_cgi", "mod_fastcgi","mod_alias", "mod_rewrite"
)
server.max-keep-alive-requests = 15
server.max-keep-alive-idle = 30
## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root = "/usr/local/opnsense/www/"
# Phalcon api routing
alias.url += ( "/api/" => "/usr/local/opnsense/www/" )
url.rewrite = ( "^/api/(.*)$" => "/api/api.php?_url=/$1")
# Maximum idle time with nothing being written (php downloading)
server.max-write-idle = 999
## where to send error-messages to
server.errorlog-use-syslog="enable"
# files to check for if .../ is requested
server.indexfiles = ( "index.php", "index.html",
"index.htm", "default.htm" )
url.access-deny = ( "~", ".inc" )
######### Options that are good to be but not neccesary to be changed #######
## bind to port (default: 80)
server.bind = "127.0.0.1"
server.port = 8999
## to help the rc.scripts
server.pid-file = "/var/run/lighttpd-api-dispatcher.pid"
## virtual directory listings
server.dir-listing = "disable"
## enable debugging
debug.log-request-header = "disable"
debug.log-response-header = "disable"
debug.log-request-handling = "disable"
debug.log-file-not-found = "disable"
server.max-request-size = 2097152
#### fastcgi module
## read fastcgi.txt for more info
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php-fastcgi.socket",
"max-procs" => 2,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "1",
"PHP_FCGI_MAX_REQUESTS" => "500"
),
"bin-path" => "/usr/local/bin/php-cgi"
)
)
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment