2013-02-18 13:45:50 +00:00
|
|
|
#
|
|
|
|
# this is a sample configuration file for qsehttpd.
|
|
|
|
#
|
|
|
|
|
2013-04-04 15:04:45 +00:00
|
|
|
# string to be used as a httpd name
|
|
|
|
name = "QSEHTTPD v1";
|
|
|
|
|
2013-04-13 05:22:41 +00:00
|
|
|
# none, unlimited, or positive number
|
|
|
|
max-nofile = none;
|
|
|
|
max-nproc = none;
|
|
|
|
|
2014-09-06 04:20:35 +00:00
|
|
|
#hooks {
|
|
|
|
# module "ext-1" {
|
|
|
|
# file = "ext";
|
2014-11-12 15:39:45 +00:00
|
|
|
# config {
|
|
|
|
# item1 = abc;
|
|
|
|
# item2 = def;
|
|
|
|
# }
|
2014-09-06 04:20:35 +00:00
|
|
|
# }
|
|
|
|
#}
|
|
|
|
|
2013-04-05 01:07:45 +00:00
|
|
|
################################################
|
|
|
|
# default server configuration
|
|
|
|
################################################
|
2013-04-04 15:04:45 +00:00
|
|
|
server-default {
|
2017-01-25 05:28:02 +00:00
|
|
|
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-04-05 01:07:45 +00:00
|
|
|
####################################################################
|
2013-02-21 15:49:49 +00:00
|
|
|
# document root
|
2013-04-05 01:07:45 +00:00
|
|
|
####################################################################
|
|
|
|
root = "/var/www";
|
2014-10-09 12:46:12 +00:00
|
|
|
#root = "1.2.3.4:80";
|
2014-10-17 14:15:15 +00:00
|
|
|
#root = "https://1.2.3.4";
|
|
|
|
#root = "http://code.abiyo.net";
|
2014-10-09 14:42:02 +00:00
|
|
|
#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";
|
|
|
|
|
2013-02-21 15:00:08 +00:00
|
|
|
realm = "default realm";
|
2014-10-09 14:42:02 +00:00
|
|
|
auth = "username:password";
|
2013-02-22 05:08:22 +00:00
|
|
|
index = "index.html",
|
2013-02-21 15:00:08 +00:00
|
|
|
"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
|
|
|
|
2013-02-22 05:01:33 +00:00
|
|
|
#name "t3.nph" = "nph";
|
2013-07-12 15:37:29 +00:00
|
|
|
#prefix "t3." = "nph";
|
2013-02-18 13:45:50 +00:00
|
|
|
suffix ".cgi";
|
2013-02-22 05:01:33 +00:00
|
|
|
suffix ".nph" = "nph";
|
2013-02-21 15:00:08 +00:00
|
|
|
suffix ".awk" = "cgi", "/usr/bin/qseawk -f";
|
|
|
|
|
|
|
|
# glob is not supported yet
|
|
|
|
# glob "x*.xxx";
|
2013-02-18 13:45:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
mime {
|
2013-02-21 15:00:08 +00:00
|
|
|
@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
|
|
|
|
#
|
|
|
|
####################################################################
|
|
|
|
|
|
|
|
|
2013-04-05 01:07:45 +00:00
|
|
|
####################################################################
|
2013-02-21 15:00:08 +00:00
|
|
|
# control access to directories
|
2013-04-05 01:07:45 +00:00
|
|
|
####################################################################
|
2013-02-21 15:00:08 +00:00
|
|
|
dir-access {
|
2013-02-22 05:01:33 +00:00
|
|
|
#prefix ".xxxx" = ok;
|
|
|
|
#suffix ".xxxx" = ok;
|
|
|
|
#name "xxxxx" = ok;
|
|
|
|
#other = noent;
|
2013-02-21 15:00:08 +00:00
|
|
|
}
|
|
|
|
|
2013-04-05 01:07:45 +00:00
|
|
|
####################################################################
|
2013-02-21 15:00:08 +00:00
|
|
|
# control access to normal files.
|
|
|
|
# cgi scripts are not control by these.
|
2013-04-05 01:07:45 +00:00
|
|
|
####################################################################
|
2013-02-21 15:00:08 +00:00
|
|
|
file-access {
|
2013-02-22 05:01:33 +00:00
|
|
|
#prefix "index.html." = ok;
|
2013-02-21 15:00:08 +00:00
|
|
|
suffix ".html" = ok;
|
|
|
|
suffix ".css" = ok;
|
|
|
|
suffix ".js" = ok;
|
|
|
|
suffix ".png" = ok;
|
|
|
|
suffix ".jpg" = ok;
|
2013-02-22 05:01:33 +00:00
|
|
|
#other = noent;
|
2013-02-21 15:00:08 +00:00
|
|
|
}
|
|
|
|
|
2013-04-05 01:07:45 +00:00
|
|
|
####################################################################
|
|
|
|
# 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.
|
|
|
|
####################################################################
|
2013-04-04 15:04:45 +00:00
|
|
|
#dir-foot = "QSEHTTPD v1";
|
|
|
|
|
2013-04-05 01:07:45 +00:00
|
|
|
####################################################################
|
|
|
|
# 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>";
|
2013-04-04 15:04:45 +00:00
|
|
|
|
2013-04-05 01:07:45 +00:00
|
|
|
####################################################################
|
|
|
|
# the error page shows the httpd name in the footer. you can
|
|
|
|
# override it with error-foot.
|
|
|
|
####################################################################
|
2013-04-04 15:04:45 +00:00
|
|
|
#error-foot = "QSEHTTPD v1";
|
2014-08-11 05:44:03 +00:00
|
|
|
|
|
|
|
####################################################################
|
|
|
|
# Default proxy configuration
|
|
|
|
####################################################################
|
|
|
|
proxy {
|
2014-10-13 14:14:06 +00:00
|
|
|
http = yes; # yes/on, no/off
|
2014-10-16 12:30:20 +00:00
|
|
|
https = yes; # yes/on, no/off
|
2014-10-13 14:14:06 +00:00
|
|
|
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
|
2014-08-13 14:35:43 +00:00
|
|
|
|
|
|
|
#pseudonym = "nice-host";
|
|
|
|
|
2014-10-14 12:55:00 +00:00
|
|
|
# TOOD: add-headers and remove-headers
|
|
|
|
#add-headers = "X-Forwarded-For: ${Client_Ipaddr}",
|
|
|
|
# "X-Forwarded-Proto: ${Client-Proto}";
|
|
|
|
#remove-headers = "Connection";
|
|
|
|
|
2014-10-09 13:09:23 +00:00
|
|
|
dns-enabled = yes; # yes/on, no/off
|
2014-08-13 14:35:43 +00:00
|
|
|
dns-server = "192.168.1.1:53";
|
|
|
|
#dns-server = "[::1]:53";
|
2014-09-28 02:51:57 +00:00
|
|
|
#dns-server = "@/tmp/dns.sock"; # unix socket prefixed with @
|
2017-01-25 05:28:02 +00:00
|
|
|
#dns-timeout = 3;
|
|
|
|
#dns-retries = 2;
|
2014-09-11 09:02:07 +00:00
|
|
|
dns-queries = a, aaaa;
|
2014-08-13 14:35:43 +00:00
|
|
|
|
2014-08-25 16:18:17 +00:00
|
|
|
#urs-enabled = yes; # no, yes,
|
2014-08-13 14:35:43 +00:00
|
|
|
#urs-server = "127.0.0.1:97";
|
2014-09-28 02:51:57 +00:00
|
|
|
#urs-server = "@/tmp/urs.sock"; # unix socket prefixed with @
|
2014-08-13 14:35:43 +00:00
|
|
|
#urs-timeout = 1;
|
|
|
|
#urs-retries = 4;
|
2014-09-06 04:20:35 +00:00
|
|
|
#urs-prerewrite-hook = "ext-1";
|
2014-08-11 05:44:03 +00:00
|
|
|
}
|
2013-02-21 15:00:08 +00:00
|
|
|
}
|
2013-02-18 13:45:50 +00:00
|
|
|
|
2013-02-21 15:00:08 +00:00
|
|
|
server {
|
2017-01-25 05:28:02 +00:00
|
|
|
backlog-size = 1024;
|
2013-02-21 15:00:08 +00:00
|
|
|
bind = "0.0.0.0:1999";
|
2017-01-25 05:28:02 +00:00
|
|
|
ssl = no;
|
2013-02-21 15:00:08 +00:00
|
|
|
|
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";
|
2013-02-21 15:00:08 +00:00
|
|
|
|
|
|
|
host "*" {
|
2014-07-16 15:31:04 +00:00
|
|
|
# place other locations before /
|
|
|
|
#location "/help" {
|
|
|
|
#}
|
|
|
|
|
2013-02-21 15:00:08 +00:00
|
|
|
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";
|
2013-02-21 15:00:08 +00:00
|
|
|
|
|
|
|
# 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-21 15:00:08 +00:00
|
|
|
|
2013-02-18 13:45:50 +00:00
|
|
|
}
|
2013-02-21 15:00:08 +00:00
|
|
|
|
|
|
|
#host "www.google.com" {
|
|
|
|
# location "/" {
|
2014-10-17 14:15:15 +00:00
|
|
|
# root = "/home/www/google";
|
2013-03-10 16:25:36 +00:00
|
|
|
# realm = "jjjjjjjj";
|
|
|
|
# auth = "username:password";
|
2013-02-21 15:00:08 +00:00
|
|
|
# }
|
|
|
|
#}
|
2013-02-18 13:45:50 +00:00
|
|
|
}
|