I’ve been following this guide: https://www.adminbyaccident.com/freebsd/how-to-freebsd/how-to-install-nextcloud-on-freebsd-12/
Used this guide for FreeBSD 14.1-RELEASE using apache24.
I installed nextcloud-30.0.4 into
/usr/local/www/nextcloud
directory.
apachectl -S
VirtualHost configuration:
*:80 [REDACTED] (/usr/local/etc/apache24/extra/httpd-vhosts.conf:23)
*:443 [REDACTED] (/usr/local/etc/apache24/extra/httpd-vhosts.conf:35)
ServerRoot: "/usr/local"
Main DocumentRoot: "/usr/local/www/apache24/data"
Main ErrorLog: "/var/log/httpd-error.log"
Mutex default: dir="/var/run/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
PidFile: "/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www" id=80
Group: name="www" id=80
I’ve configured the main documentroot to the nextcloud folder in httpd.conf file but doing that didn’t change anything so I reverted back to original directory (/usr/local/www/apache24/data).
I’ve used this configuration from the link.
<VirtualHost *:80>
ServerName Nextcloud
ServerAlias Nextcloud
DocumentRoot "/usr/local/www/nextcloud"
ErrorLog "/var/log/nextcloud-error_log"
CustomLog "/var/log/nextcloud-access_log" common
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
Protocols h2 h2c http/1.1
</VirtualHost>
<VirtualHost *:443>
ServerName Nextcloud
ServerAlias Nextcloud
DocumentRoot "/usr/local/www/nextcloud"
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder on
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
SSLCertificateFile "/usr/local/etc/apache24/server.crt"
SSLCertificateKeyFile "/usr/local/etc/apache24/server.key"
ErrorLog "/var/log/nextcloud-error_log"
CustomLog "/var/log/nextcloud-access_log" common
Protocols h2 http/1.1
</VirtualHost>
And enabled the virtualhost in httpd.conf
Did apachectl configtest
AH00526: Syntax error on line 43 of /usr/local/etc/apache24/extra/httpd-vhosts.conf:
SSLCertificateFile: file '/usr/local/etc/apache24/server.crt' does not exist or is empty
My SSL configuration isn’t complete with certbot because I plan on using nextcloud as an intranet cloud
Not sure how I can get the page to come up as Nextcloud at this point without relocating the nextcloud to the apache24/data/ directory, I’d like to have nextcloud sit in /usr/local/www/nextcloud directory because most of my configurations are set for that directory.