here is a nice tutorial i have found 2day
http://www.itd.state.ia.us/security/doc/Wi...ws_Apache_2.doc
Downloading Apache 2.0
Apache Web Site
http://httpd.apache.org
Download Site
http://www.apache.org/dist/httpd/binaries/win32/
Download the msi file of Apache 2.0 for Windows
Installation of Apache 2.0
Double-click the Apache msi file to begin installation
Welcome Screen
Click Next
License Agreement
Read the license, click Accept, and then click Next
Read This First
Read the Apache documentation, then click Next
Server Information
Enter the appropriate domain name
Enter the appropriate server name
Enter the administrator's email address
For Internet web servers, select port 80 installation as a service
For local web servers only, select port 8080 and manual startup
Setup Type
A Typical Installation is an appropriate setup
Select Custom if you wish to remove documentation or add programming libraries
Destination Folder
Select your installation folder for Apache
It is recommended to not install Apache on the system drive
Ready to Install
Click Next to install
Installation Complete
Click Finish to complete installation
Configuring Apache 2.0 (Non-SSL version)
Apache is configured using text-based configuration files. The main configuration file 'httpd.conf' controls Apache's system environment. This section will cover security related variables in this configuration file.
Run: Start Menu à Programs à Apache HTTP Server à Configure Apache Server à Edit the Apache httpd.conf Configuration File
Section 1: Global Environment
ServerRoot - be sure to set this to the location where Apache installed itself
Listen 80 - This sets the web port number where Apache http listens (default is 80)
Section 2: 'Main' Server Configuration
ServerAdmin - set to a valid administrator email address
DocumentRoot - be sure to set this to the directory where your main web files are located
UserDir - this allows all local users to create their own homepage that is automatically available on the Apache web server. It is recommended to put a pound (#) in front of this variable to disallow user web page publishing.
The following snip of tags located in the Apache configuration file disallows viewing of any files that begin with '.ht'. If you have any files that you wish to not allow viewable access via web browser (.exe for example), then use this snip to create your own special filter and place within the httpd.conf file.
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
Note the logging variables for later viewing and formats
ErrorLog
LogLevel
LogFormat
CustomLog
Default Directory Aliases can be removed if not used. An Alias is a virtual web directory. A ScriptAlias is an executable virtual directory (such as cgi-bin). Each alias directory is defined by the keyword 'Alias' and then encompassed by a set of <Directory> tags. To disable aliased directories, pound out (#) each Alias tag and everything within (and including) each <Directory> tag.
It is recommended to remove the 'manual' virtual web directory from the configuration file.
If the 'cgi-bin' is not used, remove that virtual directory as well.
IndexIgnore - set any filenames or extensions that you do not wish to be listed when a directory listing is performed on a directory
Windows Settings
Run: Administrative Tools à Computer Management à Local Users and Groups
Create a user account 'Apache' and give the account a difficult password
Leave 'User must change password at next logon' unchecked
Set 'User cannot change password'
Set 'Password never expires'
Remove Apache from all group memberships
Within Windows Explorer, set the following NTFS permissions:
Grant the Apache account the following rights to the 'Apache Group' folder where Apache was installed:
Read & Execute, List Folder Contents, and Read
Grant the Apache account 'Write' access to the 'logs' directory as well
Apache Group\Apache2\logs
Grant appropriate rights to the Apache content directories
See Appendix A below
Deny access of the Apache account to certain system files
See Appendix B below
Run: Administrative Tools à Services
Apache Service configuration
Go to 'Properties' of the Apache2 service
Select the 'Log On' tab
Select 'This account' and enter the information of the Apache user account
Appendix A:
Data Type
Example Directories
Examples
NTFS File Permissions
Apache Permissions
Static Content
\Apache Group\Apache2\htdocs
.html
Administrators (Full Control)
System (Full Control)
Apache (Read)
Alias
Script Files and Executables
\Apache Group\Apache2\cgi-bin
.pl, .php, .dll
Administrators (Full Control)
System (Full Control)
Apache (Execute)
ScriptAlias
Appendix B:
Files located within 'C:\Winnt\system32\'
at.exe
cacls.exe
cmd.exe
command.com
cscript.exe
debug.exe
edlin.exe
finger.exe
ftp.exe
ipconfig.exe
krnl386.exe
nbstat.exe
net.exe
net1.exe
netsh.exe
posix.exe
rcp.exe
regedt32.exe
regini.exe
regsvr32.exe
rexec.exe
rsh.exe
runas.exe
runonce.exe
srvmgr.exe
sysedit.exe
syskey.exe
telnet.exe
tftp.exe
tracert.exe
usrmgr.exe
Please send feedback and comments to Jared.McLaren@itd.state.ia.us




