Guest User

/etc/examples/httpd.conf

a guest
Dec 24th, 2015
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.76 KB | None | 0 0
  1. # $OpenBSD: httpd.conf,v 1.14 2015/02/04 08:39:35 florian Exp $
  2.  
  3. #
  4. # Macros
  5. #
  6. ext_addr="*"
  7.  
  8. #
  9. # Global Options
  10. #
  11. # prefork 3
  12.  
  13. #
  14. # Servers
  15. #
  16.  
  17. # A minimal default server
  18. server "default" {
  19.         listen on $ext_addr port 80
  20. }
  21.  
  22. # A name-based "virtual" server on the same address
  23. server "www.example.com" {
  24.         listen on $ext_addr port 80
  25.  
  26.         # Logging is enabled by default, but it can be turned off per server
  27.         #no log
  28.  
  29.         location "/pub/*" {
  30.                 directory auto index
  31.                 log style combined
  32.         }
  33.  
  34.         location "*.php" {
  35.                 fastcgi socket "/run/php-fpm.sock"
  36.         }
  37.  
  38.         location "/cgi-bin/*" {
  39.                 fastcgi
  40.  
  41.                 # The /cgi-bin directory is outside of the document root
  42.                 root "/"
  43.         }
  44.  
  45.         root "/htdocs/www.example.com"
  46. }
  47.  
  48. # An HTTPS server using SSL/TLS
  49. server "secure.example.com" {
  50.         listen on 127.0.0.1 tls port 443
  51.  
  52.         # Define server-specific log files relative to /logs
  53.         log { access "secure-access.log", error "secure-error.log" }
  54.  
  55.         # Increase connection limits to extend the lifetime
  56.         connection { max requests 500, timeout 3600 }
  57.  
  58.         root "/htdocs/secure.example.com"
  59. }
  60.  
  61. # Another server on a different internal IPv4 address
  62. server "intranet.example.com" {
  63.         listen on 10.0.0.1 port 80
  64.         directory { auto index, index "default.htm" }
  65.         root "/htdocs/intranet.example.com"
  66. }
  67.  
  68. # An IPv6-based server on a non-standard port
  69. server "ipv6.example.com" {
  70.         listen on 2001:db8::53f6:3eab port 81
  71.         root "/htdocs/ipv6.example.com"
  72. }
  73.  
  74. # Include MIME types instead of the built-in ones
  75. types {
  76.         include "/usr/share/misc/mime.types"
  77. }
Advertisement
Add Comment
Please, Sign In to add comment