2024. március 29., péntek

Gyorskeresés

Apache webszerver nem indul az OpenWrt-n

Írta: | Kulcsszavak: Apache . Szerver . Web . PHP . Openwrt . Router . Segmentation fault

[ ÚJ BEJEGYZÉS ]

Feltettem egy Apache szervert az OpenWrt-s routeremre, de nem működött. Először azt hittem, hogy kevés hozzá a routerem, de nem így volt. Természetesen az OpenWrt oldala nem említi, hogy az alap konfigfájlal nem fog a telepítés és az ott leírt konfigurálás után kulcsrakészen működni a rendszer....

Az oldal leír pár dolgot. Hogyan kell telepíteni, miket kell beállítani a konfigurációs fájlokban. Természetesen végigmentem én is ezeken. Átállítottam a portot, mivel az alap 80-as port már foglalt, beállítottam a PHP-hez szükséges módosításokat. De az eredmény, hogy webszerver-router IP címét és portját beírva csak forgott a kis frissítés ikon a böngészőben, de semmi nem jött be.

Mit is lehet ilyenkor tenni? Mint minden szerver, az Apache is naplózza a nyűgjeit. Na de, hol találom a naplót?
Az Apache konfig fájlja az /etc/apache.httpd.conf fájl. Ebben meg lehet adni, hogy hova naplózzon a rendszer. Benne is van a konfigban, alapból így elég volt csak rákeresni.

ErrorLog "/var/log/error_log"

Ebből kiderül, hogy a nyűgök a "/var/log/error_log" fájlból olvashatók ki. Meg is néztem a tartalmát. Ezek a sorok fogadtak.

[Sat Aug 19 10:37:26 2017] [notice] child pid 1872 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:26 2017] [notice] child pid 1874 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:26 2017] [notice] child pid 1875 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:26 2017] [notice] child pid 1876 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:26 2017] [notice] child pid 1877 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:27 2017] [notice] child pid 1873 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:27 2017] [notice] child pid 1878 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:27 2017] [notice] child pid 1879 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:27 2017] [notice] child pid 1880 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:27 2017] [notice] child pid 1881 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:27 2017] [notice] child pid 1882 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:27 2017] [notice] child pid 1883 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:27 2017] [notice] child pid 1884 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:28 2017] [notice] child pid 1885 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:29 2017] [notice] child pid 1886 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:29 2017] [notice] child pid 1887 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:30 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 4 idle, and 4 total children
[Sat Aug 19 10:37:30 2017] [notice] child pid 1888 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:30 2017] [notice] child pid 1889 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:30 2017] [notice] child pid 1890 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:30 2017] [notice] child pid 1891 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:31 2017] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 16 children, there are 8 idle, and 8 total children
[Sat Aug 19 10:37:31 2017] [notice] child pid 1892 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:31 2017] [notice] child pid 1893 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:31 2017] [notice] child pid 1894 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:31 2017] [notice] child pid 1895 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:31 2017] [notice] child pid 1896 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:31 2017] [notice] child pid 1897 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:31 2017] [notice] child pid 1898 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:31 2017] [notice] child pid 1899 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:31 2017] [notice] child pid 1901 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:31 2017] [notice] child pid 1902 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:31 2017] [notice] child pid 1903 exit signal Segmentation fault (11)
[Sat Aug 19 10:37:31 2017] [notice] child pid 1904 exit signal Segmentation fault (11)

Egyből el kezdtem, módosítgatni az /etc/apache/extra/http-mpm.conf fájlt
<IfModule mpm_prefork_module>
StartServers 16
MinSpareServers 16
MaxSpareServers 32
MaxClients 150
MaxRequestsPerChild 200
</IfModule>

Feljebb állítottam az értékeket, az alábbi résznél, resatroltam természetesen az Apache-ot, de semmi. A hiba ugyan az maradt.

Aztán rákerestem a Google barátunknál a hibára. Nem rögtön, de hamar rátaláltam egy fórumos beszélgetésre, ami alapján sikerült megoldani a gondot.

A már fent is említett /etc/apache.httpd.conf fájban kellett átállítani a LogLevel értéket, debug-ról info-ra. Restart-oltam az Apache-ot. Befrissítettem a böngészőm címsorában a megnyitott webszerverem oldalát és láss csodát.....

IT WORKS!

Ez jelenik meg a böngészőben, ha frissen felkonfigolt Apache-ünk működik! (Na meg, ha ez a szöveg van írva a DocumentRoot könyvtárunk index.html fájljába írva :) )

Copyright © 2000-2024 PROHARDVER Informatikai Kft.