Apache Webserver does not come on
and check says
[root@vmi431722 ~]# sudo apachectl configtest
AH00526: Syntax error on line 2622 of /etc/httpd/conf/httpd.conf:
cannot occur within section
Now what do I do? where do I go to find this line 2622? I’m not sure of what steps to take now
This happened to me sometime ago and I did get it going - but have forgotton
Please Help Joe or any staff if you are available
Thanks for your quick reply in the meantime I got the Apache Webserver config file from the menu of Webmin>Servers>Apache Webserver then saw the Config File in there
Located the line 2622 - it refers to a website I have on virtualmin called babylyk but the website does not come up and so whilst I was trying to get that going the Apache Server shut off and won’t come on again
The line 2622 reads as below
My configs list an address there. I think the * is a wildcard for all addresses so I’m not sure that’s the problem. Like I said above, sometimes these things ignore the # lines so they aren’t included in the actual ‘used’ line count as such. Does your error log give a better message?
My system breaks the logs into nice chunks for each site and different components so it doesn’t have that huge file to parse.
According to the docs…
configtest
Run a configuration file syntax test. It parses the configuration files and either reports Syntax Ok or detailed information about the particular syntax error. This is equivalent to apachectl -t.
that’s what I did to start with and here is what I got…
[root@vmi431722 ~]# apachectl configtest
AH00526: Syntax error on line 2622 of /etc/httpd/conf/httpd.conf:
cannot occur within section
OK. You have httpd/logs/error_log
Check that file.
Also found this. It shows only the actual lines used by Apache without the # cluttering it up. You can dump this to a file and, I’m guessing, find the correct line that way. apachectl -S1
Thanks for all your help … but I’m getting further and further away and so have reverted it all back to waht it was originally
you see it said error on line 2622 so i changed that and it still wouldn’t start so i did the check test again and it said another line error so i corrected that and then the same thing ahhpened again…
It was all working perfectly well before … this just happened as one of the websites would not launch it said cannot connect and i tried to change a line on the server … as everything else pointing domain etc is all perfect and working…
I’ve reverted it all back to as it was before- the apache server is not starting
and the check says again as it did before error on line 2622
I had this before and there is a staff member called Joe who helped me correct it very quickly - he knew exactly what lines to change etc -
I think I’ll wait for the satff to reply and help me on this…
Thanks again for all your help and effort to try get me going…
It’s not the same problem - last time it was the Updates that did this… this time It seems I’m at fault??
Is there a way I can send you the whole config file?
As I tried removing the line 2622 and checked and it said another line had another error i changed that then it went on and on to new lines
whereas it was all working fine before
it may help if I sent you the whole file - please tell me how
I did that and still the Apache Server won’t start so I did a check test and now it says
[root@vmi431722 ~]# sudo apachectl configtest
httpd: Syntax error on line 2707 of /etc/httpd/conf/httpd.conf: without matching section
looks like the same problem here as well so I removed the line 2707
and it still won’t start si I did a check again and here is what it says:
[root@vmi431722 ~]# sudo apachectl configtest
AH00526: Syntax error on line 2645 of /etc/httpd/conf/httpd.conf:
SSLCertificateFile: file ‘/etc/ssl/certs/yourcert.pem’ does not exist or is empty
Here is the line 2645 and all below that