I was setting up an Apache configuration today and edited the httpd.conf file using the Dreamweaver installation on the Windows laptop. Restart the server and crash, Apache will not start. Reloaded the default Apache httpd.conf file and restarted the server, no problem.
If I don't even make any modifications to the
httpd.conf file, but simply "Save As" and then try to restart the HTTP server it will fail. What is Dreamweaver doing to the file that is rendering it impossible to read by the HTTP server installation on this Windows laptop?
It may be something as simple as changing the line-enders to something Apache doesn't like -- it expects <LF>-only *nix line-enders. Or maybe it's wrapping the whole thing in an <html><body> tagset... Why not compare the two files using a hex-editor tool to find out?
I don't think I'd recommend using any WYSIWYG tool to edit Apache files... :)
Point taken on the WYSIWYG for text editing -- DW has an option to set line endings and it is indeed set to LF as the documents ultimately are being served on a *nix platform.
As far as your thought process for problem analysis, we think alike. After posting yesterday afternoon I decided to have a closer look at line endings. I was starting into that and that's why I merely opened the file and did a "Save As" without making any changes. I wanted to check those line endings. The default Apache for Windows binary
httpd.conf file has CR LF (0D 0A). As mentioned, the editing software was setup to use LF only, specifically because of the end server from which the documents would be served. The CR LF was converted to LF only and apache restart failed.
>> it expects <LF>-only *nix line-enders.
Therein may lie the issue. It used to be that way (at least somewhat, on Windows), but not in my recent install. If I use just the LF in this Windows install, the server fails to start every time. Convert to CR LF and we are up and running. I went back to the 2.0.55 install and either one works just fine, CR LF or just LF. So I'm starting to wonder if this is not a WYSIWYG issue at all, rather an Apache version change. Did Apache change something in it's windows HTTP server engine which fails to recognize differences in line endings?
The basis of the issue has changed now, this thread likely deserves it's home in Apache. I'm going to have a look and see if I can find anything in the Apache development notes.