Skip to content

heaphttpd.conf example

Uplusware edited this page Jun 19, 2017 · 22 revisions

heaphttpd web server configutation

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

Default web page list if only directory in resource path

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

WWW-Authenticate: None, Basic or Digest.

Keep it empty for disable WWW-Authenticate

  • WWWAuthenticate = None

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
  • CheckClientCA = no

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