Megpróbáltam szerkeszteni az alábbi konfig fájlt.
cat /etc/apache2/sites-available/nextcloud_tls_domain_self_signed.conf
# <VirtualHost *:80>
# RewriteEngine On
# RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [END,NE,R=permanent]
# </VirtualHost>
<VirtualHost *:443>
Header add Strict-Transport-Security: "max-age=15552000;includeSubdomains"
### YOUR SERVER ADDRESS ###
# ServerAdmin admin@example.com
# ServerName cloud.example.com
### SETTINGS ###
<FilesMatch "\.php$">
SetHandler "proxy:unix:/run/php/php8.3-fpm.nextcloud.sock|fcgi://localhost"
</FilesMatch>
# Intermediate configuration
SSLEngine on
SSLCompression off
SSLProtocol -all +TLSv1.2 +TLSv1.3
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
SSLHonorCipherOrder off
SSLSessionTickets off
ServerSignature off
# Logs
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
ErrorLog ${APACHE_LOG_DIR}/error.log
# Document root folder
DocumentRoot /var/www/nextcloud
# The Nextcloud folder
<Directory /var/www/nextcloud>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Satisfy Any
# This is to include all the Nextcloud rules due to that we use PHP-FPM and .htaccess aren't read
Include /var/www/nextcloud/.htaccess
</Directory>
# Deny access to your data directory
<Directory /mnt/ncdata>
Require all denied
</Directory>
# Deny access to the Nextcloud config folder
<Directory /var/www/nextcloud/config/>
Require all denied
</Directory>
<IfModule mod_dav.c>
Dav off
</IfModule>
# The following lines prevent .htaccess and .htpasswd files from being viewed by Web clients.
<Files ".ht*">
Require all denied
</Files>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
# Disable HTTP TRACE method.
TraceEnable off
# Disable HTTP TRACK method.
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACK
RewriteRule .* - [R=405,L]
# Avoid "Sabre\DAV\Exception\BadRequest: expected filesize XXXX got XXXX"
<IfModule mod_reqtimeout.c>
RequestReadTimeout body=0
</IfModule>
# Avoid zero byte files (only works in Ubuntu 24.04 -->>)
# See https://github.com/nextcloud/server/issues/3056
SetEnv proxy-sendcl 1
### LOCATION OF CERT FILES ###
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
### LOCATION OF CERT FILES ###
# SSLCertificateFile /etc/ssl/certs/star.szalaparti-eger.edu.hu.pem
#SSLCertificateKeyFile /etc/ssl/private/star.szalaparti-eger.edu.hu.key
</VirtualHost>
Itt ugye az utolsó sor lenne a lényeg szerintem. Megadtam a saját pem és key fájljaimat (ami most ugye ki van kommentelve) de sajnos hibára futott az apache a restart után:
systemctl restart apache2
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details.
root@nextcloud:~# systemctl status apache2.service
× apache2.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Mon 2025-06-16 14:17:33 CEST; 34s ago
Duration: 31min 29.860s
Docs: https://httpd.apache.org/docs/2.4/
Process: 3746 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
CPU: 29ms
Jun 16 14:17:33 nextcloud systemd[1]: Starting apache2.service - The Apache HTTP Server...
Jun 16 14:17:33 nextcloud systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Jun 16 14:17:33 nextcloud systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 16 14:17:33 nextcloud systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
root@nextcloud:~# journalctl -xeu apache2.service
Jun 16 13:28:09 nextcloud systemd[1]: Starting apache2.service - The Apache HTTP Server...
░░ Subject: A start job for unit apache2.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit apache2.service has begun execution.
░░
░░ The job identifier is 135.
Jun 16 13:28:10 nextcloud systemd[1]: Started apache2.service - The Apache HTTP Server.
░░ Subject: A start job for unit apache2.service has finished successfully
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit apache2.service has finished successfully.
░░
░░ The job identifier is 135.
Jun 16 13:46:03 nextcloud systemd[1]: Stopping apache2.service - The Apache HTTP Server...
░░ Subject: A stop job for unit apache2.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A stop job for unit apache2.service has begun execution.
░░
░░ The job identifier is 1292.
Jun 16 13:46:03 nextcloud systemd[1]: apache2.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit apache2.service has successfully entered the 'dead' state.
Jun 16 13:46:03 nextcloud systemd[1]: Stopped apache2.service - The Apache HTTP Server.
░░ Subject: A stop job for unit apache2.service has finished
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A stop job for unit apache2.service has finished.
░░
░░ The job identifier is 1292 and the job result is done.
Jun 16 13:46:03 nextcloud systemd[1]: Starting apache2.service - The Apache HTTP Server...
░░ Subject: A start job for unit apache2.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit apache2.service has begun execution.
░░
░░ The job identifier is 1292.
Jun 16 13:46:03 nextcloud systemd[1]: Started apache2.service - The Apache HTTP Server.
░░ Subject: A start job for unit apache2.service has finished successfully
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit apache2.service has finished successfully.
░░
░░ The job identifier is 1292.
Jun 16 14:17:33 nextcloud systemd[1]: Stopping apache2.service - The Apache HTTP Server...
░░ Subject: A stop job for unit apache2.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A stop job for unit apache2.service has begun execution.
░░
░░ The job identifier is 1643.
Jun 16 14:17:33 nextcloud systemd[1]: apache2.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit apache2.service has successfully entered the 'dead' state.
Jun 16 14:17:33 nextcloud systemd[1]: Stopped apache2.service - The Apache HTTP Server.
░░ Subject: A stop job for unit apache2.service has finished
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A stop job for unit apache2.service has finished.
░░
░░ The job identifier is 1643 and the job result is done.
Jun 16 14:17:33 nextcloud systemd[1]: Starting apache2.service - The Apache HTTP Server...
░░ Subject: A start job for unit apache2.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit apache2.service has begun execution.
░░
░░ The job identifier is 1643.
Jun 16 14:17:33 nextcloud systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit apache2.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Jun 16 14:17:33 nextcloud systemd[1]: apache2.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit apache2.service has entered the 'failed' state with result 'exit-code'.
Jun 16 14:17:33 nextcloud systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
░░ Subject: A start job for unit apache2.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit apache2.service has finished with a failure.
░░
░░ The job identifier is 1643 and the job result is failed.
Vagy eleve hibás elgondolás volt, hogy átírom a meglévő self signed fájlokat és akkor működni fog?