ยง2024-07-09
- /var/www/nextcloud/config/config.php
<?php
$CONFIG = array (
'instanceid' => 'oc5kx4u32hmz',
'passwordsalt' => 'BtMO2oEEHrT908y6jx8T9rF4IrSwpG',
'secret' => '/b7ZjNpCgXwswa6keolVOLmq53Vp/Xfrv4rlDjpi5UvN8TJZ',
'trusted_domains' =>
array (
0 => 'hc4bookworm.yushei.net:48501',
1 => 'munetaka.me:45103',
),
'overwrite.cli.url' => 'https://munetaka.me:45103',
'overwriteprotocol' => 'https',
'datadirectory' => '/var/www/nextcloud/data',
'dbtype' => 'mysql',
'version' => '29.0.3.4',
'htaccess.RewriteBase' => '/',
'dbname' => 'nextcloud_db',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextclouduser',
'dbpassword' => 'hc4Bookworm.yushei.net#20240708',
'installed' => true,
'appstoreenabled' => true,
'appstoreurl' => 'https://apps.nextcloud.com',
'appcodechecker' => false,
'updater.server.url' => 'https://updates.nextcloud.com/updater_server/',
'trusted_proxies' =>
array (
0 => 'fe80::99ac:c8e9:8e35:ba39',
),
'overwritehost' => 'munetaka.me:45103',
'forwarded_for_headers' => array('HTTP_X_FORWARDED_FOR'),
'allow_local_remote_servers' => true,
'local' =>
array (
0 => 'fe80::99ac:c8e9:8e35:ba39',
1 => 'github.com',
2 => '192.30.253.112',
3 => '192.30.253.113',
),
'appstore.experimental.enabled' => false,
'mail_from_address' => 'alexlai',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'h2Jammy.yushei.net',
'mail_smtphost' => 'h2jammy.yushei.net',
'mail_smtpport' => '25',
'mail_smtpauth' => 1,
'mail_smtpname' => 'alexlai',
'mail_smtppassword' => 'alex1765',
'appstoreenabled' => true,
'appstoreurl' => 'https://apps.nextcloud.com/api/v1',
'maintenance_window_start' => '01:00',
'maintenance_window_end' => '05:00',
'default_phone_region' => 'TW',
);
- /etc/apache2/ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 80
Listen 48501
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
- /etc/apache2/sites-enabled/nextcloud.conf
<VirtualHost *:48501>
ServerName n2Bookworm.yushei.net
DocumentRoot /var/www/nextcloud/
# log files
ErrorLog /var/log/apache2/n2Bookworm.yushei.net-error.log
CustomLog /var/log/apache2/n2Bookworm.yushei.net-access.log combined
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L]
RewriteRule ^\.well-known/webfinger /public.php?service=webfinger [QSA,L]
RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
</IfModule>
</Directory>
</VirtualHost>