Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/feed-rss2.php on line 8
Setup httpd in OpenBSD – AKLWEB HOST LLC Support Center https://support.aklwebhost.com Fri, 27 Dec 2019 07:05:51 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.4 Setup httpd in OpenBSD https://support.aklwebhost.com/knowledgebase/setup-httpd-in-openbsd/ https://support.aklwebhost.com/knowledgebase/setup-httpd-in-openbsd/#respond Fri, 27 Dec 2019 07:05:51 +0000 https://support.aklwebhost.com/?post_type=manual_kb&p=2899 Introduction

OpenBSD 5.6 introduced a new daemon called httpd, which supports CGI (via FastCGI) and TLS. No additional work is needed to install the new httpd daemon because it is included in the base system. This article explains how to setup a basic web server using it.

Configuration

We will be editing the following files.

  • /etc/rc.conf.local
  • /etc/httpd.conf

Simply add httpd_flags="" into /etc/rc.conf.local.

Open /etc/rc.conf.local in your favorite text editor and add:

pkg_scripts="httpd"

Update /etc/httpd.conf. Use the example below as a template, and make changes as noted below in the comments. Replace “example” accordingly.

ext_ip="10.0.0.1" # Change this value to your aklweb host IP

server "default" {
        listen on $ext_ip port 80 
} 
types { 
        text/css css ; 
        text/html htm html ; 
        text/txt txt ; 
        image/gif gif ; 
        image/jpeg jpg jpeg ; 
        image/png png ; 
        application/javascript js ; 
        application/xml xml ; 
} 
server "www.example.net" { 
        listen on $ext_ip port 80 
        root "/htdocs/example.net" 
} 
server "www.example.com" { 
        listen on $ext_ip port 80 
        root "/htdocs/example.com" 
}

Alternatively, you can include all the Mime Types as follows:

types { 
       include "/usr/share/misc/mime.types"
} 

Next, upload your web content and put it into /var/www/htdocs/example.com.

Start the server

Your new httpd daemon is configured for use. Now, you just need to start the server:

$ doas /etc/rc.d/httpd start
]]>
https://support.aklwebhost.com/knowledgebase/setup-httpd-in-openbsd/feed/ 0