Categories
OpenBSD php

OpenBSD 6.3 install php7 on httpd

Trying to follow instruction from http://php.net/manual/en/install.unix.openbsd.php (thanks to the creator).

Steps taken to install php7 on httpd (OpenBSD 6.3) as follow.

  • install php packages
    • pkg_add php
    • choose php version 7
    • rcctl enable php70_fpm
  • create /etc/httpd.conf

Example /etc/httpd.conf
#
# paths are relative to chroot – e.g, ‘/var/www/run/php-fpm.sock’
server “default” {
listen on * port 80
location “*.php” {
fastcgi socket “/run/php-fpm.sock”
}
directory index index.php
root “/htdocs”
}

  • copy localtime and hosts files from /etc to /var/www/etc
  • rcctl enable httpd
  • restart or rcctl start php70_fpm and rcctl start httpd

Leave a Reply

Your email address will not be published. Required fields are marked *