mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 02:09:45 +07:00
Merge pull request #13144 from GiorgioCaculli/patch-1
Update example_openbsd.rst
This commit is contained in:
@@ -15,7 +15,7 @@ From a base installed OpenBSD system you can just do::
|
||||
|
||||
The extra packages::
|
||||
|
||||
# pkg_add postgresql-server redis pecl74-redis php-pdo_pgsql
|
||||
# pkg_add postgresql-server redis pecl82-redis php-pdo_pgsql
|
||||
|
||||
|
||||
This will take care of your dependencies and give you the options to choose which PHP version do you want.
|
||||
@@ -27,7 +27,11 @@ Create a virtualhost in ``/etc/httpd.conf`` and add the following content to it:
|
||||
|
||||
server "domain.tld" {
|
||||
listen on egress tls port 443
|
||||
hsts max-age 15768000
|
||||
hsts {
|
||||
max-age 15768000
|
||||
preload
|
||||
subdomains
|
||||
}
|
||||
|
||||
tls {
|
||||
certificate "/etc/ssl/domain.tld_fullchain.pem"
|
||||
@@ -40,59 +44,44 @@ Create a virtualhost in ``/etc/httpd.conf`` and add the following content to it:
|
||||
connection request timeout 3600
|
||||
connection timeout 3600
|
||||
|
||||
block drop
|
||||
root "/nextcloud"
|
||||
directory index "index.php"
|
||||
|
||||
# Ensure that no '*.php*' files can be fetched from these directories
|
||||
location "/nextcloud/config/*" {
|
||||
location "/config/*" {
|
||||
block drop
|
||||
}
|
||||
|
||||
location "/nextcloud/data/*" {
|
||||
location "/data/*" {
|
||||
block drop
|
||||
}
|
||||
|
||||
# Note that this matches "*.php*" anywhere in the request path.
|
||||
location "/nextcloud/*.php*" {
|
||||
root "/nextcloud"
|
||||
request strip 1
|
||||
fastcgi socket "/run/php-fpm.sock"
|
||||
}
|
||||
|
||||
location "/apps/*" {
|
||||
pass
|
||||
}
|
||||
|
||||
location "/nextcloud/apps/*" {
|
||||
root "/nextcloud"
|
||||
request strip 1
|
||||
location "/core/*" {
|
||||
pass
|
||||
}
|
||||
|
||||
location "/nextcloud/core/*" {
|
||||
root "/nextcloud"
|
||||
request strip 1
|
||||
pass
|
||||
}
|
||||
|
||||
location "/nextcloud" {
|
||||
block return 301 "$DOCUMENT_URI/index.php"
|
||||
}
|
||||
|
||||
location "/nextcloud/" {
|
||||
block return 301 "$DOCUMENT_URI/index.php"
|
||||
}
|
||||
|
||||
location "/.well-known/carddav" {
|
||||
block return 301 "https://$SERVER_NAME/nextcloud/remote.php/dav"
|
||||
block return 301 "https://$SERVER_NAME/remote.php/dav"
|
||||
}
|
||||
|
||||
location "/.well-known/caldav" {
|
||||
block return 301 "https://$SERVER_NAME/nextcloud/remote.php/dav"
|
||||
block return 301 "https://$SERVER_NAME/remote.php/dav"
|
||||
}
|
||||
|
||||
location "/.well-known/webfinger" {
|
||||
block return 301 "https://$SERVER_NAME/nextcloud/public.php?service=webfinger"
|
||||
block return 301 "https://$SERVER_NAME/public.php?service=webfinger"
|
||||
}
|
||||
|
||||
location match "/nextcloud/ocs-provider/*" {
|
||||
directory index index.php
|
||||
location match "/ocs-provider/*" {
|
||||
pass
|
||||
}
|
||||
}
|
||||
@@ -106,7 +95,7 @@ Make sure that httpd(8) is enabled and started::
|
||||
PHP
|
||||
---
|
||||
|
||||
Assuming that you are on OpenBSD -current (or >= 6.8-stable) you could use PHP 7.4 so I will keep this version, but the concept is the same for other version.
|
||||
Assuming that you are on OpenBSD -current (or >= 6.8-stable) you could use PHP 8.2 so I will keep this version, but the concept is the same for other version.
|
||||
|
||||
The PHP packages will be available since you installed Nextcloud with pkg_add, so you just need to adjust a bit your php.ini.
|
||||
|
||||
@@ -129,13 +118,13 @@ And increase some limits::
|
||||
|
||||
We can enable the PHP modules with::
|
||||
|
||||
# cd /etc/php-7.4.sample
|
||||
# for i in *; do ln -sf ../php-7.4.sample/$i ../php-7.4/; done
|
||||
# cd /etc/php-8.2.sample
|
||||
# for i in *; do ln -sf ../php-8.2.sample/$i ../php-8.2/; done
|
||||
|
||||
And then we just enable and start PHP::
|
||||
|
||||
# rcctl enable php74_fpm
|
||||
# rcctl start php74_fpm
|
||||
# rcctl enable php82_fpm
|
||||
# rcctl start php82_fpm
|
||||
|
||||
|
||||
Database
|
||||
|
||||
Reference in New Issue
Block a user