Answer» Hello... Since Apache is mainly a Linux Platform application, I figured I would post it here; however, I am testing the use of a Win32 Apache release 2.2.3 and was wondering if anyone who was familiar with the HTTPD configuration file might be able to shed light on this issue I am having.
I am trying to do probably something that Apache was never intended to do, and that is operate off of a CD in a solid state form. Anyways, I can point everything in the HTTPD file away from c:\program files\apache.... to X:\Program Files\Apache... ( The CD-Rom ) drive, but a single line in the HTTPD in relation to the server service start up point that has to be on a Hard Drive and not on a CD.
I am thinking that this may be due to a routine which requires a read/write buffer on the hard drive to operate. And if this is so, then it is impossible to do away with the hard drive for the Apache Web Server Service.
*** Another idea I came up with was to do away with Windows 2000 and take like my copy of a LiveCD like KNOPPIX and build and burn a special LiveCD with Apache Web Server and the pages to host on the specific port. Not sure if even this can be done or not, but if I need a Read/Write Buffer, Knoppix will definately create a Virtual Swap space in Memory to make it happen.
Any suggestions? Thanks! :-/
My partial HTTPD file for Win32 Apache 2.2.3 HTTP Server is below: The line that has to point to a HD is in Red below, and the CD Rom is MAPPED as X:\ in BLUE.
# # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See for detailed information. # In particular, see # # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/foo.log" # with ServerRoot set to "X:/Program Files/Apache Software Foundation/Apache2.2" will be interpreted by the # server as "X:/Program Files/Apache Software Foundation/Apache2.2/logs/foo.log". # # NOTE: Where filenames are specified, you must use forward slashes # instead of backslashes (e.g., "X:/apache" instead of "X:\apache"). # If a drive letter is omitted, the drive on which Apache.exe is located # will be used by default. It is recommended that you always supply # an explicit drive letter in absolute paths, however, to avoid # confusion. #
# ThreadsPerChild: constant number of worker threads in the server process # MaxRequestsPerChild: maximum number of requests a server process serves ThreadsPerChild 250 MaxRequestsPerChild 0
# # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point # ServerRoot at a non-local disk, be sure to point the LOCKFILE directive # at a local disk. If you wish to share the same ServerRoot for multiple # httpd daemons, you will need to CHANGE at least LockFile and PidFile. # ServerRoot "c:/Program Files/Apache Software Foundation/Apache2.2"
# # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses (0.0.0.0) # #Listen 12.34.56.78:80 Listen 80
# # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # What is the error you are getting?
I can't see any reason why you can't set your root to a CD, if everything is just static HTML (no hit counters or anything like that)
Not sure about using ServerRoot though, as I use DocumentRoot in my httpd.conf Code: [Select]<VirtualHost nnn.nnn.nnn.nnn mmm.mmm.mmm.mmm> ServerAlias www.domainname.com domainname.com ServerName www.domainname.com DocumentRoot /WWW/directory </VirtualHost>Well here is what I did to better explain the problem.
1.) Installed Apache 2.2.3 Win32 application to Windows XP Pro system 2.) Edited the HTTPD.Conf file to change all instances of C: in the file to X:, which is my CD Rom. 3.) Created a seperate folder called Build and created a folder in it called "Program Files". 4.) Copied the entire Apache Tree to this C:\build\program files\ folder as preparation for the burn of the stand alone CD. 5.) Burned CD. 6.) Left CD in CD Rom X: and tried to start the Apache Service though the services interface. I would get the message "Starting" in the Apache interface window, and then 3 seconds later "Service Failed to Start." 7.) Went back to the original path of Apache in Program Files of C: drive and altered each X: back to C: until I located the line that was the problem of the service failing to start. After the service started, switch all prior C:'s back to X:'s since I located the one line that needs to load from C: 8.) Now here I stand with the service failing to start when pointed to X:\ but will start if pointed to C:\ and I was thinking that maybe the registry would have to be altered to know to point to X:\ but I shouldn't have to since the Httpd.conf file directs to wherever you need to launch it. 9.) I further tested my theory that it has to run from a HD vs CD Rom, by copying the entire apache tree to my D: drive a HD partition and altering the line for ServerRoot to D:/ as seen below, and the service started without any problems..... So I am starting to suspect that the service when loaded on whichever drive needs exclusive Read/Write Access to that drive, and the CD Rom, being Read-Only is causing it to fail..... SO if this is the fact then I might need to create a Ram Disk, virtual swap space for apache to run in memory, and I dont know how to do that.....? :-? :-? :-?
*** Now thinking of maybe seeing if I can bundle Apache with BartPE, since I cant find a way to alter my Knoppix 4.0.2 Live-CD to add my apache stuff. BartPE I know CREATES a virtual swap space in memory, so if this is the only problem, then... It should work I suppose... Any other suggestions you can think of?
# # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point # ServerRoot at a non-local disk, be sure to point the LockFile directive # at a local disk. If you wish to share the same ServerRoot for multiple # httpd daemons, you will need to change at least LockFile and PidFile. # ServerRoot "d:/Program Files/Apache Software Foundation/Apache2.2"
|