A problémám a következő: Nextcloud telepítve proxmox VM-ben. Innen. (Egyébként szuper munka, ha valakinek kell egy előkonfigurált natív nextcloud vm, jó szívvel ajánlom. A post install script is zseniális!) A VM importálása és a telepítés is simán zajlott. Http-n tökéletesen üzemel. Szerettem volna saját tanúsítvánnyal validálni. Ehhez ezt a leírást követtem. Feltöltöttem a megfelelő könyvtárakba a pem és a key fájlokat, módosítottam a default-ssl.conf állományt. Majd amikor újraindítottam az apache2 service-t akkor ezt kapom:
Jun 06 10:48:53 nextcloud systemd[1]: Starting apache2.service - The Apache HTTP Server...
Jun 06 10:48:53 nextcloud apachectl[2031]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Jun 06 10:48:53 nextcloud systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Jun 06 10:48:53 nextcloud systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 06 10:48:53 nextcloud systemd[1]: Failed to start apache2.service - The Apache HTTP Server.
root@nextcloud:~# systemctl start apache2.service
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.
Itt ugye az a helyzet, hogy saját fix ip-n van a szolgáltatás (illetve van FQDN is), de ő a 127.0.1.1 címen keresi. Vagy más a hiba?
Mit kell tennem, hogy működjön?
Mi a hivatalos módja egy gépen a saját cert importálásának?
Köszönöm!
- 1096 megtekintés
Hozzászólások
Első körben futtatnék egy
apachectl configtest -et
Fedora 41, Thinkpad x280
- A hozzászóláshoz be kell jelentkezni
Köszönöm.
root@nextcloud:~# apachectl configtest
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
A hiba valóban valahol itt van...
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Akkor esetleg ServerName FQDN berakni ?
Fedora 41, Thinkpad x280
- A hozzászóláshoz be kell jelentkezni
Bocsi. Melyik konfigfileba/változóba kell betennem a fqdn-t?
Szerk. Fontos! Módosítottam a config.php fájlt. Mert anélkül nem indult http-n a site! Ott egy array-ba kellett felvennem a fix ip-t.
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Igen!
root@nextcloud:~# cat /var/www/nextcloud/config/config.php
<?php
$CONFIG = array (
'passwordsalt' => 'tcZ+jknkjhbjbj',
'secret' => '9H+wp8ez',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '10.210.64.25',
2 => 'docs.domainnevem.hu',
),
Ez lehet a hiba?
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Ez egy warning, kell legyen valami nagyobb gond is (mondjuk attól még meg kell fixálni). Ugye az error.log-ot is nézed?
Szerk: példa
$ grep ServerName /usr/local/etc/apache2/httpd.conf
# ServerName gives the name and port that the server uses to identify itself.
ServerName f33-bonanza:80
$ grep f33-bonanza /etc/hosts
50.75.100.125 f33-bonanza bonanza f33
- A hozzászóláshoz be kell jelentkezni
Egyébként Ubuntu Serveren van. Itt nincs httpd.conf állomány. És most, hogy ezt leírtam eszembe jutott, hogy az /etc/apache2/sites-available/nextcloud_tls_self _signed.conf állomány legutolsó sorában találtam elérési utat, amit nem írtam saját cert névre. Tehát még ezt megpróbálom...
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Jó, hát nyilván a disztributor kötelességének érzi, hogy mindent felkavarjon, de ettől még valamelyik fájlban benne van a ServerName.
$ apachectl -t -D DUMP_INCLUDES
Included configuration files:
(*) /usr/local/etc/apache2/httpd.conf
(1037) /usr/local/etc/apache2/ssl.conf
- A hozzászóláshoz be kell jelentkezni
Ezt a hibaüzenetet nekem is kiírja a konténerben lévő Nextcloud, de ettől függetlenül teszi a dolgát.
nextcloud | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.4. Set the 'ServerName' directive globally to suppress this message
- A hozzászóláshoz be kell jelentkezni
Igen, nálam is. Az érdekesség, hogy ettől függetlenül a service fut és működik.
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Nézd meg, hogy mit ad ki a hostname -f parancs. Ha nem FQDN-t, akkor az /etc/hosts file-ba a 127.0.0.1 bejegyzéshez írd hozzá a teljes nevet.
- A hozzászóláshoz be kell jelentkezni
Ez után kell systemctl reload apache2?
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
root@nextcloud:~# hostname -f
nextcloud
cat /etc/hosts
10.210.64.25 docs.domainnevem.hu
10.210.64.25 docs
127.0.0.1 docs.domainnevem.hu
#127.0.1.1 nextcloud
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Na, túl hamar írtam. 127.0.1.1-hez javasolja az FQDN-t és a hostnevet is beírni, tehát
127.0.1.1 docs.domainnevem.hu docs
(man hostname)
- A hozzászóláshoz be kell jelentkezni
Mindegy, hogy melyikhez irod, jo a 127.0.0.1-hez is a lenyeg az hogy EGY SORBAN legyen, es a sorrend az FQDN ROVIDNEV. Nem forditva, nem kulon bejegyzeskent, kotelezon ez a szintaxis.
Igy garantaltan mukodik
Az apache-nak meg nem reload hanem restart kell, mert most ki van konyokolve.
- A hozzászóláshoz be kell jelentkezni
Alakul.
Could not reliably determine the server's fully qualified domain name, using 2001:738:80b:d8fb:be24:11ff:fe46:78bc. Set the 'ServerName' directive globally to suppress this message
Syntax OK
Most hol is kellene beállítanom a ServerName-t?
Szerk. A hosts fájlban kikommenteltem az ipv6-os sorokat, de így sem megy...
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Az Apache konfigjában egy globális konfigrészletnél
ServerName fqdn
- A hozzászóláshoz be kell jelentkezni
Talán ezzel előrébb jutnánk?
root@nextcloud:~# apache2ctl -S
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 2001:738:80b:d8fb:be24:11ff:fe46:78bc. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:80 is a NameVirtualHost
default server 2001:738:80b:d8fb:be24:11ff:fe46:78bc (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost 2001:738:80b:d8fb:be24:11ff:fe46:78bc (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost 2001:738:80b:d8fb:be24:11ff:fe46:78bc (/etc/apache2/sites-enabled/nextcloud_http_domain_self_signed.conf:1)
*:443 2001:738:80b:d8fb:be24:11ff:fe46:78bc (/etc/apache2/sites-enabled/nextcloud_tls_domain_self_signed.conf:6)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Szerintem nem az FQDN a probléma, az csak egy warning szokott lenni, attól még futna.
Amit feltöltöttél cert-et, az fullchain vagy csak egy sima (szerver) cert? Ugyanis a CA certek között nincsenek ott az intermediate certek általában, így a cert ellenőrzése nem fog sikerülni, ha csak egy sima certet töltöttél fel és azt nem egy ismert root CA, hanem egy intermediate állította ki. Ezen már elbukhat az indulás.
- A hozzászóláshoz be kell jelentkezni
Jó eséllyel tényleg ez van, ezt szerintem a configtest nem nézi.
zászló, zászló, szív
- A hozzászóláshoz be kell jelentkezni
Igen. Köszönöm mindkettőtöknek. Valószínüleg ez lesz. Nem töltöttem intermediate certet. Kaptam egy wildcard certet (szerintem root) és azt töltöttem fel simán. Most merre lenne érdemes elindulni?
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Vissza az alapokhoz.
Hozd össze egy alap apache2-ben hogy a https működjön egy statikus oldalra.
Használd az AI-t, ilyen típusú problémák megoldására elég jó szokott lenni.
zászló, zászló, szív
- A hozzászóláshoz be kell jelentkezni
Rendben. Ezt fogom tenni.
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
> Most merre lenne érdemes elindulni?
Megvizsgálni az *.cert file tartalmát. `openssl x509 -text` egy jó kezdet. (Ami azt illeti, a cert-ben nincs semmi titok, azt kiteheted valami publikus helyre.)
Részletesebben:
1. ha a cert tartalma bináris szemét, akkor der2pem konverzió (openssl x509 -in derfile -inform der -out pemfile
)
2. ha több "--BEGIN" rész van benne, akkor minden ilyen részt külön kell megvizsgálni, és remélhetőleg összeáll a darabokból a lánc
3. egy cert-et az openssl x509 -in pemfile -noout -text >pemfile.txt
paranccsal lehet olvasható formára alakítani.
- A hozzászóláshoz be kell jelentkezni
Ez a "kaptam egy wildcard root certet" ez igen furán hangzik...
Hacsak nem self signed, akkor persze "root".
zászló, zászló, szív
- A hozzászóláshoz be kell jelentkezni
Pongyolán fogalmaztam, elnézést kérek. Self signed.
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Nem nyert, igazából Let's Encrypt által kiállított.
- A hozzászóláshoz be kell jelentkezni
Szóval nem. Tényleg kaptam wildcard tanúsítványt a saját domainunkhoz. Ez a topic szólt róla...
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Tippre elbökődik valahol az apache2 konfig.
Lehet még az is hogy egyszerű szintaktikai hiba, bár akkor a configtest ki kéne szúrja.
Én azt javasolnám hogy próbálj meg egy üres (statikus) apache2-t felkonfigolni https-re.
Ha az már megy akkor gyógyítanám rá a nextcloudra.
Elgondolkoznék azon is, hogy a https termination-t:
- a webserverben/nextcloudban közvetlenül csinálom
- reverse proxyként eléteszem. Ezt akár ugyanazzal az instance-al de külön virtualhosttal is meg lehet oldani
Tippre te most az első megközelítést próbálod összehozni.
zászló, zászló, szív
- A hozzászóláshoz be kell jelentkezni
Igen. Jól tippelsz. Egy önálló VM a Proxmox szerveren és azon belül próbálok https-t varázsolni.
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Tippre elbökődik valahol az apache2 konfig.
Lehet még az is hogy egyszerű szintaktikai hiba, bár akkor a configtest ki kéne szúrja.
Én azt javasolnám hogy próbálj meg egy üres (statikus) apache2-t felkonfigolni https-re.
Ha az már megy akkor gyógyítanám rá a nextcloudra.
Elgondolkoznék azon is, hogy a https termination-t:
- a webserverben/nextcloudban közvetlenül csinálom
- reverse proxyként eléteszem. Ezt akár ugyanazzal az instance-al de külön virtualhosttal is meg lehet oldani
Tippre te most az első megközelítést próbálod összehozni.
zászló, zászló, szív
- A hozzászóláshoz be kell jelentkezni
Ha jól veszem ki a szavaidból nem teljesen tiszta a certificate-k működése, mi az root CA, intermediate CA stb.
Nagyon lesarkítva pár alap fogalom, a teljesség igénye nélkül.
A root CA (Certificate Authority) az a legfelsőbb szintű tanúsítvány tulajdonos. Ő jogosult ezzel más tanúsítványokat kiállítani. Ha megbízható tanúsítványról beszélünk (ezeket telepítik az OS-ek alapból), akkor ezzel már nincs dolog. mert rendelkezésre áll. Természetesen a publikus része ezzel aláírni senki sem tud.
Intemediate CA (köztes tanúsítvány): Olyan CA, amelyet egy másik - többnyire root CA-val - van kiállítva. Ez a CA beépül a tanúsítvány láncba a root CA és a tényleges tanúsítvány (cert közé). Ilyet szoktak venni nagyobb cégek. Itt nincs használatban.
A certificate (tanusítvány) van a lánc végén ami egy domain-ra vonatkozik egy vagy több host résszel, illetve wildcard (bármilyen host az adott domainen belül)
Most akkor lássuk ezek után a konkrét eseted. Az általad linkelt fórum téma a Let'sEncrypt által aláírt ingyenes tanúsítványra vonatkozna. Javaslom olvass utána a Let'sEncrypt oldalán a hogyan tudsz certificatet előállítani és hogyan kell hozzáadni az adott operációs rendszeren futó webszerverhez.
(Valószínűleg az általad elsőnek linkelt oldalon is van egy leírás, de ahhoz ki kell nyitni a TCP/80-as és a TCP/443-as portot az Internet felől https://docs.hanssonit.se/s/W6fMouPiqQz3_Mog/virtual-machines-vm/d/W6fM…)
Sokan a certbot eszközt használják a tanúsítvány kezeléshez. Itt tudsz meg többet a működésről és a használatról. https://certbot.eff.org/
A certificate-ket az adott OS-hez igazodó könyvtárakba kell (erősen javasolt) tárolni.
Ha minden a helyén van akkor be kell konfigurálni az TLS certificate-et az adott domainhez (és nem a globális konfigurációnál)
Szükség lehet globális szinten engedélyezni az TLS támogatást. a2enmod parancs segíthet.
Ha az Apache konfiguráció rendben van akkor apache2ctl configtest paranccsal ellenőrizhető a konfiguráció helyessége Apache újraindítás előtt.
Ha az újraindítás sikertelen, akkor journalctl -xeu apache2 kiadja a logokat, ahol meg tudod nézni mit jelez hibának.
Ha fut az Apache, akkor a curl vagy openssl paranccsal meg tudod nézni mi a gond a certificate beállítással.
Ezek alapján meg kell tudni javítani.
- A hozzászóláshoz be kell jelentkezni
(IntermediateCA-cert mindig van, azért kell, hogy ne a Root-ot kelljen használni a napi folyamathoz (vagyis az EE-cert-ek tényleges kiállításához). A RootCA-certet (vagyis inkább a hozzá tartozó privátkulcsot) csak akkor kell elővenni, ha az Intermediate lejár vagy isten ments kompromittálódik.
- A hozzászóláshoz be kell jelentkezni
Nem akartam túlzottan belemenni, mert konkrét könyvek szólnak erről (csak a terjedelem miatt) . Próbáltam csak a lényegre fókuszálni.
Ettől függetlenül köszönöm a kiegészítést. A gyakorlat valóban ez irányba mozdult el.
A célom az volt, hogy adjak egy listát, amin ha végig megy a kérdező a lehető legnagyobb eséllyel eljusson a jó megoldáshoz.
- A hozzászóláshoz be kell jelentkezni
Köszönöm.
Olvastam sok napon keresztül, és kezdek tisztábban látni sok mindent. De azért ez nem olyan egyszerű dolog...
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Először is mindenkinek köszönöm a segítő hozzászólásokat. Haladok a dolgokkal szépen lassan. Hátráltatott egyéb munka és betegség is.
Megoldódott a Apache error "Could not reliably determine the server's fully qualified domain name" problémám.
Mindenkitől elnézést kérek, amiért elvittelek titeket a susnyába. A leírásban let's encrypt szerepel de én rendelkezem saját aláírt wildcard certtel. Ezt szeretném beállítani a VM-ben.
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
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?
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Másold már ide be légyszi a cert publikus részét! Azt úgy is meg tudná bárki nézni, ha működne az oldalad, és lehet közelebb leszünk a problémához, ha látjuk, mi van benne. Az állomány konkrét tartalmát lenne hasznos látnunk, nem openssl értelmezés után.
Alapjában véve úgy működnie kellene, hogy a snakeoil "gyári" cert sorokat kikommelteled, és helyette elengeded a saját cert és key állományaidra mutató sorokat.
A másik meg, hogy ez sokat nem segít a hibakeresésben, hogy "unit failed" a journalctl-től. Jó lenne valami Apache error.log vagy ilyesmi, amiből megtudjuk, pontosan mi a baja az Apache-nak, ami miatt nem indul a szolgáltatás.
- A hozzászóláshoz be kell jelentkezni
A múltkor az 'error.log' nevű fájlt ajánlottam, most viszont azt mondanám, hogy nézd meg az 'error.log'-ot.
- A hozzászóláshoz be kell jelentkezni
Az irány jó, csak csináltál egy "in medias res"-t. Vagyis a közepébe vágtál a gyors siker érdekében.
Első körben jó lenne látni a hibát.
`journalctl -xeu apache2` és az `apache2ctl configtest` parancsok kimenetét nézd meg, esetleg a releváns részeket másold be ide.
Ami gyakori hiba. az a cert fájlok jogosultságának és tulajdonosának a helytelen beállítása. Ellenőrizd és ha kell igazítsd a minta cert (snakeoil) jogosultságaihoz.
A key file csak a tulajdonos által lehet olvasható asszem.
Maga cert olvasható bárki számára.
Ha a certek rendben vannak, akkkor ellenőrizd, hogy be van-e importálva a root CA a cert-hez.
Ha ezek rendben vannak, akkor a az apache2ctl configtest parancs nem jelez hibát és jó eséllyel indul is az Apache.
- A hozzászóláshoz be kell jelentkezni
Igen a jogosultságokkal van a baj. De sok év linuxozás után van itt valami amit nem értek.
root@nextcloud:~# ls -la /etc/ssl/certs/ssl-cert-snakeoil.pem
-rw-r--r-- 1 root root 1090 Mar 21 22:37 /etc/ssl/certs/ssl-cert-snakeoil.pem
root@nextcloud:~# ls -la /etc/ssl/private/ssl-cert-snakeoil.key
-rw-r----- 1 root ssl-cert 1704 Mar 21 22:37 /etc/ssl/private/ssl-cert-snakeoil.key
root@nextcloud:~# ls -la /etc/ssl/certs/star.szalaparti-eger.edu.hu.pem
lrwxrwxrwx 1 root root 64 Jun 6 10:03 /etc/ssl/certs/star.szalaparti-eger.edu.hu.pem -> /usr/local/share/ca-certificates/star.szalaparti-eger.edu.hu.crt
root@nextcloud:~# ls -la /etc/ssl/private/star.szalaparti-eger.edu.hu.key
-rw-rw-r-- 1 ncadmin ncadmin 3268 Jun 6 09:22 /etc/ssl/private/star.szalaparti-eger.edu.hu.key
Igen. A pem file egy simlink is? Vagy mit akar jelenteni pontosan a -> jel? Mielőtt beállítanám a jogosultságokat szeretném jobban megérteni miit is jelent.
Köszönöm a válaszokat!
Szerk. Inkább csak magamnak jegyzetképpen. A jogosultságok oktálisan:
root@nextcloud:~# stat -c "%a %n" /etc/ssl/certs/ssl-cert-snakeoil.pem
644 /etc/ssl/certs/ssl-cert-snakeoil.pem
root@nextcloud:~# stat -c "%a %n" /etc/ssl/private/ssl-cert-snakeoil.key
640 /etc/ssl/private/ssl-cert-snakeoil.key
root@nextcloud:~# stat -c "%a %n" /etc/ssl/certs/star.szalaparti-eger.edu.hu.pem
777 /etc/ssl/certs/star.szalaparti-eger.edu.hu.pem
root@nextcloud:~# stat -c "%a %n" /etc/ssl/private/star.szalaparti-eger.edu.hu.key
664 /etc/ssl/private/star.szalaparti-eger.edu.hu.key
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Igen, az egyik egy szimlink a /etc/-ből a /usr/local/share-be. A szimlinknek is vannak jogbitjei, de azok ritkán/sosem számítanak, csak a fájlnak a jogbitjei, amire a szimlink mutat.
Ettől függetlenül a hiba leírását az 'error.log' nevű fájlban érdemes keresni.
- A hozzászóláshoz be kell jelentkezni
Jogos. Ezzel adós maradtam:
root@nextcloud:~# cat /var/log/apache2/error.log
[Tue Jun 17 00:00:00.616122 2025] [ssl:warn] [pid 3815:tid 134602344159104] AH01909: docs.szalaparti-eger.edu.hu:443:0 server certificate does NOT include an ID which matches the server name
[Tue Jun 17 00:00:00.617376 2025] [mpm_event:notice] [pid 3815:tid 134602344159104] AH00489: Apache/2.4.58 (Ubuntu) OpenSSL/3.0.13 configured -- resuming normal operations
[Tue Jun 17 00:00:00.617389 2025] [core:notice] [pid 3815:tid 134602344159104] AH00094: Command line: '/usr/sbin/apache2'
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Ez arra utal, hogy elindult, csak megemlíti, hogy a ServerName
nem egyezik meg a cert-ben felsorolt Subject Alternative Names
egyikével sem.
$ openssl x509 -in default.cert.pem -noout -text
...
X509v3 extensions:
...
X509v3 Subject Alternative Name:
DNS:f33-bonanza, DNS:f33, DNS:bonanza, DNS:10.20.30.40, IP Address:10.20.30.40
...
Megjegyzés: a te esetedben nem lesznek IP-címek, inkább valami 'csillagos', hogy pl *.gimnazium.sulinet.hu
Persze az lehet, hogy vannak ott további sorok előtte/mögötte, amiket meg kellene nézni.
Akár még azt is meg lehet kérdezni, hogy ez egy systemd-hez hozzáigazított apache-e, mert ha nem, akkor a systemd megteszi, hogy hibásnak ítéli a futást, és leállítja.
- A hozzászóláshoz be kell jelentkezni
Nem találtam benne semmit ami a saját wildcard domainunkra utalna.
openssl x509 -in star.szalaparti-eger.edu.hu.pem -noout -text
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
2a:60.....
Signature Algorithm: sha256WithRSAEncryption
Issuer: C = GR, L = Athens, O = Hellenic Academic and Research Institutions Cert. Authority, CN = Hellenic Academic and Research Institutions RootCA 2015
Validity
Not Before: Sep 2 07:41:55 2021 GMT
Not After : Aug 31 07:41:54 2029 GMT
Subject: C = GR, O = Hellenic Academic and Research Institutions CA, CN = HARICA TLS RSA Root CA 2021
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (4096 bit)
...
X509v3 extensions:
X509v3 Basic Constraints: critical
CA:TRUE
X509v3 Authority Key Identifier:
...F3:71:24:54:0B ....
Authority Information Access:
CA Issuers - URI:http://repo.harica.gr/certs/HaricaRootCA2015.crt
X509v3 Certificate Policies:
Policy: X509v3 Any Policy
X509v3 Extended Key Usage:
TLS Web Client Authentication, TLS Web Server Authentication
X509v3 CRL Distribution Points:
Full Name:
URI:http://crl.harica.gr/HaricaRootCA2015.crl
X509v3 Subject Key Identifier:
0A:33:EA:93:5B:C5:57:EA:
X509v3 Key Usage: critical
Digital Signature, Certificate Sign, CRL Sign
Signature Algorithm: sha256WithRSAEncryption
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Vissza kellene menni ide: https://hup.hu/comment/3194142#comment-3194142
> …ha több "--BEGIN" rész van benne, akkor minden ilyen részt külön kell megvizsgálni, és remélhetőleg összeáll a darabokból a lánc…
Amit beidéztél, az lehet, hogy az első a fájlban (nem kellene), de nem az EE-cert, hanem egy Intermediate Cert.
Subject: C=GR, O=Hellenic Academic and Research Institutions CA, CN=HARICA TLS RSA Root CA 2021
Issuer: C=GR, L=Athens, O=Hellenic Academic and Research Institutions Cert. Authority, CN=Hellenic Academic and Research Institutions RootCA 2015
- A hozzászóláshoz be kell jelentkezni
Az rendben van. Köszönöm a segítséget mindenkinek!
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni
Beállítottam a jogosultságokat és minden helyre került.
Köszönöm a sok segítséget mindenkinek, sokat tanultam ebből a konkrét feladatból!
“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”
― Philip K. Dick
- A hozzászóláshoz be kell jelentkezni