# php -v
PHP 8.3.17 (cli) (built: Feb 15 2025 01:11:28) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.17, Copyright (c) Zend Technologies
with Zend OPcache v8.3.17, Copyright (c), by Zend Technologies
# pkg install mod_php83
# service php_fpm enable # 设置 PHP-FPM 服务开机自启
# service php_fpm start # 启动 PHP-FPM 服务
# pkg info -D mod_php83
mod_php83-8.4.4_1:
On install:
******************************************************************************
Consider switching to php-fpm and mod_fast_cgi as per Apache httpd project
recommendation. See https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM
建议根据 Apache httpd 项目的推荐,切换到 php-fpm 和 mod_fast_cgi。详情请见 https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM
******************************************************************************
If you are building PHP-based ports in poudriere(8) or Synth with ZTS enabled,
add WITH_MPM=event to /etc/make.conf to prevent build failures.
如果你在 poudriere(8) 或 Synth 中构建启用了 ZTS 的 PHP 基础端口,请将 WITH_MPM=event 添加到 /etc/make.conf,以防止构建失败。
******************************************************************************
Make sure index.php is part of your DirectoryIndex.
确保 index.php 是 DirectoryIndex 的一部分。
You should add the following to your Apache configuration file:
你应该将以下内容添加到你的 Apache 配置文件中:
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
******************************************************************************
# pkg info -D nextcloud-php83
nextcloud-php83-30.0.6:
On install:
/!\ The FreeBSD package REQUIRES the apps_paths configuration as /!\
/!\ seen in config/config.sample.php to function /!\
/!\ FreeBSD 包需要配置 apps_paths,如 config/config.sample.php 中所示才能正常工作 /!\
Please note that everything has been installed in /usr/local/www/nextcloud.
请注意,所有文件已安装在 /usr/local/www/nextcloud 中。
You will probably want to add an alias to your httpd.conf file,
something like this:
你可能需要在 httpd.conf 文件中添加一个别名,类似如下:
Alias /nextcloud /usr/local/www/nextcloud
AcceptPathInfo On
<Directory /usr/local/www/nextcloud>
AllowOverride All
Require all granted
</Directory>
And restart Apache. Nextcloud will start the bundled installer on first
access. Once the bundled installer finishes, further configuration can
be done via 'Settings', 'Administration'. Additional configuration
options are available in
然后重启 Apache。Nextcloud 会在首次访问时启动捆绑的安装程序。安装程序完成后,可以通过 'Settings' 和 'Administration' 进行进一步配置。更多配置选项可以在以下位置找到:
/usr/local/www/nextcloud/config/config.php
You can find annotated configuration options in config.documented.php
in the same directory. Nextcloud's configuration documentation is at
你可以在同一目录下的 config.documented.php 中找到带注释的配置选项。Nextcloud 的配置文档请参考:
https://docs.nextcloud.com/server/stable/admin_manual/configuration_server
The caching options require additional Nextcloud configuration.
缓存选项需要额外的 Nextcloud 配置。
On upgrade:
After a version migration you should upgrade your nextcloud instance
using command line:
升级后,你应该使用命令行升级你的 nextcloud 实例:
occ upgrade
Merge any changes to /usr/local/www/nextcloud/.htaccess.dist into .htaccess (above the
'#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####' divider if it exists)
and update the dynamic part of the file using the commandline:
将 /usr/local/www/nextcloud/.htaccess.dist 中的任何更改合并到 .htaccess 文件中(如果存在的话,请合并到 '#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####' 分隔符上方),并使用命令行更新文件的动态部分:
occ maintenance:update:htaccess
As of Nextcloud 27.1.0 the recommended PHP version is 8.2.
Nextcloud 27.1.0,推荐使用 PHP 8.2 版本。