Welcome to WebmasterWorld Guest from 54.166.54.215

Forum Moderators: open

Editing Apache httpd.conf in Dreamweaver crashes server

Anybody know why?

   
9:49 pm on Apr 4, 2007 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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?
10:07 pm on Apr 4, 2007 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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... :)

Jim

3:12 pm on Apr 5, 2007 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

4:03 pm on Apr 6, 2007 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



OK, we are back to this being a DW issue. I can open and edit the configuration files with TextPad and save the files with either CRLF or just LF and the Apache server restarts no problem.

The odd part is nothing has changed on this laptop except the new HTTP Server. I used to open and edit the configuration files with DW in the Apache 2.0.55 install and never had an issue.

2:06 am on Apr 14, 2007 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Using a different editor now as suggested. That fixed everything ;)
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month