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!
- 291 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
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