qse/cmd/http/httpd.conf

240 lines
6.7 KiB
Plaintext
Raw Normal View History

2013-02-18 13:45:50 +00:00
#
# this is a sample configuration file for qsehttpd.
#
# string to be used as a httpd name
name = "QSEHTTPD v1";
# none, unlimited, or positive number
max-nofile = none;
max-nproc = none;
#hooks {
# module "ext-1" {
# file = "ext";
# config {
# item1 = abc;
# item2 = def;
# }
# }
#}
################################################
# default server configuration
################################################
server-default {
backlog-size = 1024;
2013-03-04 04:46:22 +00:00
# default ssl certificate file
#ssl-cert-file = "/etc/qse/cert.pem";
# default ssl private key file
#ssl-key-file = "/etc/qse/key.pem";
####################################################################
2013-02-21 15:49:49 +00:00
# document root
####################################################################
root = "/var/www";
#root = "1.2.3.4:80";
#root = "https://1.2.3.4";
#root = "http://code.abiyo.net";
#root = "<302>http://www.google.com"; #301, 302, 303, 307, 308
#root = "<404>"; #400 - 599
2013-02-18 13:45:50 +00:00
2014-07-30 16:42:25 +00:00
# pseudonym to use in Via: for proxying
#pseudonym = "my-host";
realm = "default realm";
auth = "username:password";
2013-02-22 05:08:22 +00:00
index = "index.html",
"index.cgi";
2013-02-18 13:45:50 +00:00
2013-04-23 08:21:26 +00:00
# you can get some files exempted from authorization
# with auth-rule.
#auth-rule {
# suffix ".awk" = noauth;
# other = auth;
#}
2013-02-18 13:45:50 +00:00
cgi {
2014-08-11 05:44:03 +00:00
#name "t3.nph" = "nph";
#prefix "t3." = "nph";
2013-02-18 13:45:50 +00:00
suffix ".cgi";
suffix ".nph" = "nph";
suffix ".awk" = "cgi", "/usr/bin/qseawk -f";
# glob is not supported yet
# glob "x*.xxx";
2013-02-18 13:45:50 +00:00
}
mime {
@include "httpd-mime.conf";
2013-02-18 13:45:50 +00:00
}
2014-08-11 05:44:03 +00:00
####################################################################
#
# Accee control including dir-access and file-access can be
# defined using patterns and actions shown below
#
# Pattern
# prefix ".xxxx" (prefix match)
# suffix "xxxx." (suffix match)
# name "xxxx.yyyy" (exact match)
# other (all others)
#
# Action
# noent
# forbid
# ok
#
####################################################################
####################################################################
# control access to directories
####################################################################
dir-access {
#prefix ".xxxx" = ok;
#suffix ".xxxx" = ok;
#name "xxxxx" = ok;
#other = noent;
}
####################################################################
# control access to normal files.
# cgi scripts are not control by these.
####################################################################
file-access {
#prefix "index.html." = ok;
suffix ".html" = ok;
suffix ".css" = ok;
suffix ".js" = ok;
suffix ".png" = ok;
suffix ".jpg" = ok;
#other = noent;
}
####################################################################
# directory listing includes this string in the <head> tag of the
# generated html page.
####################################################################
#dir-head = "<style type='text/css'>body { background-color:#d0e4fe; font-size: 0.9em; } div.header { font-weight: bold; margin-bottom: 5px; } div.footer { border-top: 1px solid #99AABB; text-align: right; } table { font-size: 0.9em; } td { white-space: nowrap; } td.size { text-align: right; }</style>";
####################################################################
# directory listing shows the httpd name in the footer. you can
# override it with dir-foot.
####################################################################
#dir-foot = "QSEHTTPD v1";
####################################################################
# the error page includes this string in the <head> tag of the
# generated html page.
####################################################################
#error-head = "<style type='text/css'>body { background-color:#d0e4fe; font-size: 0.9em; } div.header { font-weight: bold; margin-bottom: 5px; } div.footer { border-top: 1px solid #99AABB; text-align: right; }</style>";
####################################################################
# the error page shows the httpd name in the footer. you can
# override it with error-foot.
####################################################################
#error-foot = "QSEHTTPD v1";
2014-08-11 05:44:03 +00:00
####################################################################
# Default proxy configuration
####################################################################
proxy {
http = yes; # yes/on, no/off
https = yes; # yes/on, no/off
connect = yes; # yes/on, no/off
intercept = yes; # yes/proxy/on, local, no/off,
upgrade = yes; # yes/on, no/off
x-forwarded = yes; # yes/on, no/off
#pseudonym = "nice-host";
# TOOD: add-headers and remove-headers
#add-headers = "X-Forwarded-For: ${Client_Ipaddr}",
# "X-Forwarded-Proto: ${Client-Proto}";
#remove-headers = "Connection";
dns-enabled = yes; # yes/on, no/off
dns-server = "192.168.1.1:53";
#dns-server = "[::1]:53";
#dns-server = "@/tmp/dns.sock"; # unix socket prefixed with @
#dns-timeout = 3;
#dns-retries = 2;
dns-queries = a, aaaa;
2014-08-25 16:18:17 +00:00
#urs-enabled = yes; # no, yes,
#urs-server = "127.0.0.1:97";
#urs-server = "@/tmp/urs.sock"; # unix socket prefixed with @
#urs-timeout = 1;
#urs-retries = 4;
#urs-prerewrite-hook = "ext-1";
2014-08-11 05:44:03 +00:00
}
}
2013-02-18 13:45:50 +00:00
server {
backlog-size = 1024;
bind = "0.0.0.0:1999";
ssl = no;
2013-03-10 16:25:36 +00:00
# you can create certificate/key files as shown below
# openssl genrsa -out key.pem
# openssl req -new -key key.pem -out cert.csr
# openssl req -new -x509 -key key.pem -out cert.pem -days 1095
2013-03-04 04:46:22 +00:00
ssl-cert-file = "/etc/qse/cert.pem";
ssl-key-file = "/etc/qse/key.pem";
host "*" {
2014-07-16 15:31:04 +00:00
# place other locations before /
#location "/help" {
#}
location "/" {
# uncomment the followng block to override the default.
2013-02-21 15:49:49 +00:00
#root = "/var/www";
2014-07-30 16:42:25 +00:00
# pseudonym to use in Via: for proxying
#pseudonym = "my-host";
# uncomment the followng block to override the default.
# if you want to disable authentication while the default
# enables it, don't put a value like 'realm;'
#realm = "default realm";
#auth = "username:password";
# uncomment the following block to override the default
#index = "index.cgi", "index.html";
# uncomment the following block to override the default
#cgi {
# suffix ".cgi";
# suffix ".awk" = "/usr/bin/qseawk -f";
#}
# uncomment the following block to override the default.
#mime {
# suffix ".htm" = "text/html";
# suffix ".html" = "text/html";
# suffix ".txt" = "text/html";
# suffix ".css" = "text/css";
# suffix ".xml" = "text/xml";
# suffix ".js" = "application/javascript";
# suffix ".jpg" = "image/jpeg";
# suffix ".png" = "image/png";
#}
2013-02-18 13:45:50 +00:00
}
2013-02-18 13:45:50 +00:00
}
#host "www.google.com" {
# location "/" {
# root = "/home/www/google";
2013-03-10 16:25:36 +00:00
# realm = "jjjjjjjj";
# auth = "username:password";
# }
#}
2013-02-18 13:45:50 +00:00
}