running Apache from CD

This is a discussion on running Apache from CD within the Windows Web Servers forums, part of the Web Server and Related Forums category; i would like to run apache from a cd. i installed it (win2k), selecting the option to run it from ...


Go Back   Usenet Forums > Web Server and Related Forums > Windows Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2004
Michael Powe
 
Posts: n/a
Default running Apache from CD

i would like to run apache from a cd. i installed it (win2k), selecting
the option to run it from the command line on port 8080, copied the
install directory to another partition and uninstalled the original. i
changed httpd.conf to point to writable directories for htdocs, cgi-bin
and logs. for testing purposes, i then made the apache directory
read-only. i run apache from the commandline thus:

$ apache -e debug

it shows only that it is loading the modules, then it bails out without
further messages. this is version 2.0.48.

any thoughts on how i can make this work would be appreciated.

thanks.

mp
  #2 (permalink)  
Old 02-20-2004
Brian K. White
 
Posts: n/a
Default Re: running Apache from CD

When I run Process Explorer from (SysInternals) it shows an open that
Apache.exe has an open handle on "C:\Program Files\Apache Group\Apache2".
This may be your problem. Apache may not run correctly if it cannot get a
handle to that directory. Also keep in mind that sometimes file handles are
opened indirectly do to the internal workings of Windows. (Many times, a
program will have an open handle to a directory if it has created, updated
or deleted files in the directory.) My suggestion is to try everything else
as read only but leave the Apache2 directory and everything above it alone.

--Brian K. White

"Michael Powe" <michael+hervieu@trollope.org> wrote in message
news:c12fi90nr2@enews4.newsguy.com...
> i would like to run apache from a cd. i installed it (win2k), selecting
> the option to run it from the command line on port 8080, copied the
> install directory to another partition and uninstalled the original. i
> changed httpd.conf to point to writable directories for htdocs, cgi-bin
> and logs. for testing purposes, i then made the apache directory
> read-only. i run apache from the commandline thus:
>
> $ apache -e debug
>
> it shows only that it is loading the modules, then it bails out without
> further messages. this is version 2.0.48.
>
> any thoughts on how i can make this work would be appreciated.
>
> thanks.
>
> mp



  #3 (permalink)  
Old 02-20-2004
Michael Powe
 
Posts: n/a
Default Re: running Apache from CD

>>>>> "Brian" == Brian K White <nospam@foxfire74.com> writes:

Brian> When I run Process Explorer from (SysInternals) it shows an
Brian> open that Apache.exe has an open handle on "C:\Program
Brian> Files\Apache Group\Apache2". This may be your problem.
Brian> Apache may not run correctly if it cannot get a handle to
Brian> that directory. Also keep in mind that sometimes file
Brian> handles are opened indirectly do to the internal workings
Brian> of Windows. (Many times, a program will have an open
Brian> handle to a directory if it has created, updated or deleted
Brian> files in the directory.) My suggestion is to try
Brian> everything else as read only but leave the Apache2
Brian> directory and everything above it alone.

thank you, i will try that.

mp

--
cat: /home/powem/.signature: No such file or directory
  #4 (permalink)  
Old 02-21-2004
Jim Patterson
 
Posts: n/a
Default Re: running Apache from CD

Michael Powe wrote:
> i would like to run apache from a cd. i installed it (win2k), selecting
> the option to run it from the command line on port 8080, copied the
> install directory to another partition and uninstalled the original. i
> changed httpd.conf to point to writable directories for htdocs, cgi-bin
> and logs. for testing purposes, i then made the apache directory
> read-only. i run apache from the commandline thus:
>
> $ apache -e debug


You might want to try the "-d <server-root>" option. This should change
the defaults for everything to be relative to the new root you specify.
One thing it could be getting messed up on is the PID file, where it
writes its process ID for apachectl to find it (see the PidFile directive).

If that still doesn't help, you could see what files it is opening using
FILEMON (http://www.sysinternals.com/ntw2k/source/filemon.shtml). If it
is a file permissions issue, FILEMON should be able to pinpoint it
pretty quickly.


--
Jim Patterson
Ottawa, CANADA
  #5 (permalink)  
Old 02-25-2004
jorge
 
Posts: n/a
Default Re: running Apache from CD

I have a cd with apache 2.0.47 on it with php and perl, and it run
fine under 2k and up. but i do have some sneaky triks i use
1. i set apache to use c:\wwwroot as document root, i put all the log,
and pit file in there too.
how o do this?
a vbscirpt, the copies the wwwroot folder from cd to the hd :)
here is the scitp:
Wscript.Echo "Files are now being copied..."
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFolder "\server", "c:\server"
Dim o,d
Set oFs = CreateObject ("Scripting.FileSystemObject")
strFolder = "c:\server\apache"
set oDir = oFs.GetFolder(strFolder)
o=0: d=0
ScanAllSubDirs oDir

Sub ScanAllSubDirs (oFolder)
For each oFile in oFolder.files
DimReadOnly oFile
Next
For each oSubFolder in oFolder.subFolders
DimReadOnly oSubFolder
ScanAllSubDirs oSubFolder
Next
End sub

Sub DimReadOnly (ByRef objDat)
o=o+1
If objDat.Attributes MOD 2=1 then
objDat.Attributes = objDat.Attributes-1
d=d+1
End If
End Sub
Wscript.Echo "Installing Apache Services..."
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run("%SystemRoot%\system32\cmd.exe /k
c:\server\apache\bin\apache.exe -D SSL -k install")
WshShell.Run("c:\server\mysql\bin\mysqld-max-nt --install")
Wscript.Echo "Creating Schortcuts..."
Set Shell = CreateObject("WScript.Shell")
DesktopPath = Shell.SpecialFolders("Desktop")
Set link = Shell.CreateShortcut(DesktopPath & "\Start Apache.lnk")
link.Arguments = " -k start"
link.Description = "Start Apache"
link.HotKey = ""
link.IconLocation = "c:\server\apache\bin\apache.exe,0"
link.TargetPath = "c:\server\apache\bin\apache.exe"
link.WindowStyle = 1
link.WorkingDirectory = "c:\server\apache\bin"
link.Save
Set link2 = Shell.CreateShortcut(DesktopPath & "\Stop Apache.lnk")
link2.Arguments = "-k stop"
link2.Description = "Stop Apache"
link2.HotKey = ""
link2.IconLocation = "c:\server\apache\bin\apache.exe,0"
link2.TargetPath = "c:\server\apache\bin\apache.exe"
link2.WindowStyle = 1
link2.WorkingDirectory = "c:\server\apache\bin"
link2.Save
Set link3 = Shell.CreateShortcut(DesktopPath & "\restart Apache.lnk")
link3.Arguments = "-k restart"
link3.Description = "restart Apache"
link3.HotKey = ""
link3.IconLocation = "c:\server\apache\bin\apache.exe,0"
link3.TargetPath = "c:\server\apache\bin\apache.exe"
link3.WindowStyle = 1
link3.WorkingDirectory = "c:\server\apache\bin"
link3.Save
Wscript.Echo "Apache Has been installed!"
Wscript.Echo "Perl is installed to c:\server\perl\bin\perl.exe"
Wscript.Echo "Mysql is installed: root/nopassword"

as you ca see i also install my sql and oter programs
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:13 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0