472,779 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

Tools to validate Apache config file?

Hi All,

I'm getting to grips with PHP and Apache (on Windows for current
development, production site will be on Linux), and have a simple (I hope!)
request.

When you change the httpd.conf file and restart Apache, if you have made an
error you simply get a popup saying that there has been an error, but giving
no useful information about what or where the error is (on Windows anyway).

Does anyone know of any tools or scripts for parsing / validating the
httpd.conf file to track down where the errors are? Like I said, right now
my requirement is for something that will work on Windows, though later I'll
also need something to work on Linux.

TIA,

JON
Oct 4 '05 #1
4 6588
use apache -t (run syntax check for config files)

note output below is from cygwin shell on win xp

bea@frag /cygdrive/d/Program Files/Apache Group/Apache2/bin
$ ./Apache -?
Usage: d:\Program Files\Apache Group\Apache2\bin\Apache.exe [-D name]
[-d directory] [-f file]
[-C
"directive"] [-c "directive"]
[-w] [-k
start|restart|stop|shutdown]
[-k
install|config|uninstall] [-n service_name]
[-v] [-V]
[-h] [-l] [-L] [-t] [-S]
Options:
-D name : define a name for use in <IfDefine name>
directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-n name : set service name and use its ServerConfigFile
-k start : tell Apache to start
-k restart : tell running Apache to do a graceful restart
-k stop|shutdown : tell running Apache to shutdown
-k install : install an Apache service
-k config : change startup Options of an Apache service
-k uninstall : uninstall an Apache service
-w : hold open the console window on error
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed settings (currently only vhost
settings)
-S : a synonym for -t -D DUMP_VHOSTS
-t : run syntax check for config files

bea@frag /cygdrive/d/Program Files/Apache Group/Apache2/bin
$ ./apache -v
Server version: Apache/2.0.48
Server built: Oct 29 2003 09:37:51

bea@frag /cygdrive/d/Program Files/Apache Group/Apache2/bin
$
HTH

Oct 4 '05 #2
*******
Beagle:
*******

Yup, apache -t seems highly promising!

<be*******@hotmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
use apache -t (run syntax check for config files)


*******
Davide:
*******

I don't seem to have httpd in my (Windows) Apache bin directory - is that a
Linux-only thing?

"Davide Bianchi" <da************@onlyforfun.net> wrote in message
news:sl***************************@fogg.onlyforfun .net...
httpd -t should do it

Thanks to both of you for the help!

JON
Oct 4 '05 #3
Jon Maz wrote:
*******
Beagle:
*******

Yup, apache -t seems highly promising!

<be*******@hotmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
use apache -t (run syntax check for config files)


*******
Davide:
*******

I don't seem to have httpd in my (Windows) Apache bin directory - is that a
Linux-only thing?

"Davide Bianchi" <da************@onlyforfun.net> wrote in message
news:sl***************************@fogg.onlyforfun .net...
httpd -t should do it

Thanks to both of you for the help!

JON

For historical reasons, httpd is what the apache program is called on
Linux (and I guess on other Unix). I think it's something different on
Windows - perhaps apache.exe?

Colin
Oct 4 '05 #4
Yes, apache on Windows seems to be the same as httpd on Linux.

JON

"Colin Fine" <ne**@kindness.demon.co.uk> wrote:

For historical reasons, httpd is what the apache program is called on
Linux (and I guess on other Unix). I think it's something different on
Windows - perhaps apache.exe?

Colin
Oct 5 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jim Johnstone | last post by:
Some details of my HOME PC. I am running the following .... Win2000 SP4; IE V6; 512MB RAM; H/Disk Space OK. In the past couple of weeks I have installed/configured from binaries for .. MySQL...
0
by: Phil Powell | last post by:
if ($this->isSuccessful && !$hasMogrified) { // SMACK IT ALL TOGETHER @imagecopyresampled($newImage, $image, $config, $config, 0, 0, $config, $config, $origWidth, $origHeight); // SAVE TO FILE...
2
by: digidalmation | last post by:
Hello all. I've been trying to get my linux server to run mod_python. It's a Mandrake 10 linux box, and apache/mod_python are installed from rpms. apache2-mod_python-2.0.48_3.1.3-1mdk...
0
by: Ray Tayek | last post by:
hi, fooling around with xmlspy (which seems pretty broken when *doing* xslt's). trying to validate in java using code from http://cermics.enpc.fr/doc/java/j2eetutorial-1.4/doc/JAXPSAX13.html...
11
by: gregsands | last post by:
Hi Im trying to install PHP 5.05 on Windows XP running Apache 2.0.54 Apache is running fine and ive made all the changes to the pnp.ini file and Apache config file, restarted Apache but all I get...
8
by: lawrence k | last post by:
I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying to install PHP 5.1.4. I can not get the ./configure command to work. I keep getting this error: configure: error: Invalid...
9
by: davids58 | last post by:
I installed Apache 2.2.3 per the instructions in the book I'm reading 'AJAX and PHP' by Darie et al. After installation, I confirmed that the server was working. I then installed MySQL and PHP....
0
by: logic0 | last post by:
I am tryn to upgrade apache from 2.0.47 and following steps i got it from apache site Downloaded new binaries from apache for 2.0.55 and go to new downloaded directory and Run The Configuration...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.