Skip to content

heaphttpd.conf example

Uplusware edited this page Sep 26, 2017 · 22 revisions

Global

  • CloseStderr = yes
  • LocalHostName = localhost
  • HostIP =
  • InstanceNum = 8
    • The nunmber pf work processes.
  • InstanceThreadNum = 256
    • The number of work threads in every work peocess
  • InstancePrestart = no

Instance workload balance scheme: use IP or round

Balance the session load by I(ip) or R(round)

  • InstanceBalanceScheme = R

HTTP

  • HTTPEnable = yes
  • HTTPPort = 5080

HTTPS

  • HTTPSEnable = yes
  • HTTPSPort = 5081
  • HTTPSCipher = ALL
  • HTTP2Enable = no
  • HTTP2TLSCipher = ECDHE-RSA-AES128-GCM-SHA256:ALL

Tunneling/Proxy

  • HTTPTunnelingEnable = no
  • HTTPTunnelingCacheEnable = no

Cache in local memory

  • Total Cache size unit is Mega byte, For example, 64 is 64M byte

    • TotalLocalFileCacheSize = 64
    • TotalTunnelingCacheSize = 64
  • Single Cache size unit is Kilo byte, For example, 512 is 512k byte

    • SingleLocalFileCacheSize = 512
    • SingleTunnelingCacheSize = 512

Default web page list if only directory in resource path

  • DefaultWebPages = index.html; index.htm; default.html; default.htm; index.php; default.php

WWW/Proxy-Authenticate: None, Basic or Digest.

Keep it empty to disable WWW/Proxy-Authenticate

  • WWWAuthenticate = None
  • ProxyAuthenticate = None

Integrate Local System's users

  • IntegrateLocalUsers = no
    • Only support Basic authentication method

User List XML File

  • UserListFile=/etc/heaphttpd/users.xml

Private path: for temporary files

  • PrivatePath=/tmp/heaphttpd/private

HEAPHTTPD work path

  • WorkPath=/var/heaphttpd
    • api path ${WorkPath}/api
    • cgi path ${WorkPath}/cgi-bin
    • cgi path ${WorkPath}/cgi-bin
    • websocket path ${WorkPath}/ws
    • extention path ${WorkPath}/ext

Extension List

  • ExtensionListFile=/etc/heaphttpd/extension.xml

CA

  • CARootCrt = /var/heaphttpd/cert/ca.crt

  • CAServerCrt = /var/heaphttpd/cert/server.crt

  • CAServerKey = /var/heaphttpd/cert/server.key

  • CAClientCrt = /var/heaphttpd/cert/client.crt

  • CAClientKey = /var/heaphttpd/cert/client.key

  • CAPassword = KR9axMmsokE=

    • ! Please use 'heaptool --encode' to encrypt the password
  • CACheckClient = no

    • Verify the client certification for HTTPS connection.

PHP

  • PHPMode = fpm
    • fpm or cgi

PHP-FPM

  • FPMSockType = UNIX
    • INET or UNIX
  • FPMSockFile = /run/php/php7.0-fpm.sock
  • FPMIPAddr = 127.0.0.1
  • FPMPort = 9000

PHP-CGI

  • PHPCGIPath = /usr/bin/php-cgi

CGI

 CGIName: MUST be unique                                 
 MUST be the fitst line of every CGI section    
 CGIType: F(fastcgi) or S(scgi)                          
 CGISockType: INET UNIX                                     

  • CGIName = webpy
  • CGIType = F
  • CGIPgm = /var/heaphttpd/webpy/main.py
  • CGISockType = INET
  • CGISockFile = /var/run/webpy-fcgi.sock
  • CGIIPAddr = 127.0.0.1
  • CGIPort = 9001

  • CGIName = scgi
  • CGIType = S
  • CGIPgm = /var/heaphttpd/scgi/main.py
  • CGISockType = INET
  • CGISockFile = /var/run/webpy-scgi.sock
  • CGIIPAddr = 127.0.0.1
  • CGIPort = 9002

  • CGIName = fcgi
  • CGIType = F
  • CGIPgm = /var/heaphttpd/fcgi/main.py
  • CGISockType = INET
  • CGISockFile = /var/run/webpy-fcgi.sock
  • CGIIPAddr = 127.0.0.1
  • CGIPort = 9003

memcached(need to enable this feature when compile)

  • MEMCACHEDList= 127.0.0.1:11211

Clone this wiki locally