473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 6642
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.