Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: warren on February 27, 2009, 08:12:11 AM
-
Hi,
SMe 7.4 - Server-gateway-fully updated;
Scenario:
I had a client that modified a custom-template for an ibay that he allows access
to via restricted ip's. However, he had inadvertently put a CR in line of space separated ip's; so that the line looked like :
allow from xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy
192.168.101.1
Instead of :
allow from xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy 192.168.101.1
The template fragments were expanded, and service restarted ; afterwards
I got a call saying no web pages / webmail / Server-manager was available. I determined that they had made a change to a custom template, so started looking there (logged in remotely via ssh ) and found the "CR" , fixed the offending line, expanded the template and restarted the service with all working.
The question ; Where are these errors logged to : I looked in messages, boot.log, httpd/access_log ; httpd/error_log ( could see http 304 );
Thanks
Warren
-
Template expansion errors are logged in /var/log/messages at least when activated through the server-manager and the event system. When expanded manually they are echoed to the command line (not sure if they will be written in the log file then).
The errors and access log of the webserver are located in /var/log/httpd/, there is a version for the webserver (error/access_log) and for the administration interface (admin-error/access_log).
You can always test the syntax of the webserver configuration file by executing the following:
httpd -t
If OK it should echo somethng like "Syntax OK", otherwise it give you a pointer to the offending line or configuration instruction.
-
The question ; Where are these errors logged to : I looked in messages, boot.log, httpd/access_log ; httpd/error_log ( could see http 304 );
warren,
AFAIK no httpd.conf syntax error log will be written anywhere. httpd will never be started if httpd.conf is broken, maybe that's why no log written.
test httpd.conf syntax as cactus advise you.
thomasch
-
cactus,
Code: [Select]
httpd -t
Thanks I'll keep that handy. Strange though that the service showed as running; Anyways, using httpd -t , should show up any errors.
-
AFAIK no httpd.conf syntax error log will be written anywhere. httpd will never be started if httpd.conf is broken, maybe that's why no log written.
When I was writing the PHP5-CGI contrib, I managed to get httpd-esmith to start with errors in httpd.conf. It did start but was not pretty - continuous errors scrolling on to the screen and no way to interact with the console as a result. IIRC I ended up rolling the VM back (I was using VMWare) because I couldn't find a way to fix it.
-
httpd will never be started if httpd.conf is broken
No, that is not true, if the error is not vital for the core it might start...