Top Banner
Apache on Windows Rich Bowen <[email protected]> Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000
23

Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

Dec 31, 2015

Download

Documents

Maryann Allen
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

Apache on WindowsRich Bowen

<[email protected]>

Part I: Installing, configuring, and running Apache on your Windows

machines.

ApacheCon 20007:30pm, March 9th, 2000

Orlando, Florida

Page 2: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

History

• October, 1997 - Apache 1.3

• http://www.apacheweek.com/issues/97-10-17#13b2

• There were some ports available before that

Page 3: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

“entirely experimental”

Please note that at this time, Windows support is entirely experimental, and is recommended only for experienced users.

… Warning: Apache on NT has not yet been optimized for performance. Apache still performs best, and is most reliable on Unix platforms.

Page 4: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

In spite of this warning, I have found that, at least in the conditions where I use it, Apache works on NT as well as any of the alternatives. And, if you take administrator frustration into account, much better. ;-)

Page 5: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

What are the alternatives?

• IIS

• Netscape

• WebSite

• Dozens of others

• Apache is newer to NT than many of the alternatives, but is based on a much more mature code base.

Page 6: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

But IIS is better, right?

• Having long been told that IIS is a better server on NT, I’ve always had my doubts. Using Perl, I did some benchmarking. These results should not be taken as scientific, but are believable to me, at least.

Page 7: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

Benchmarking: Apache vs IIS

D:\Apachecon>perl benchmark.pl

GET

Benchmark: timing 2000 iterations of Apache, IIS...

Apache: 34 wallclock secs ( 6.50 usr + 4.55 sys = 11.05 CPU)

IIS: 31 wallclock secs ( 6.65 usr + 4.43 sys = 11.08 CPU)

CGI

Benchmark: timing 2000 iterations of Apache, IIS...

Apache: 63 wallclock secs ( 5.73 usr + 3.82 sys = 9.54 CPU)

IIS: 64 wallclock secs ( 6.15 usr + 3.97 sys = 10.12 CPU)

Page 8: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

And, in case you care ...

use Benchmark;

use LWP::Simple;

print "GET\n\n";

timethese(2000, {

'Apache' => 'get ("http://9.95.144.25/test.txt";)',

'IIS' => 'get ("http://9.95.144.25:90/test.txt";)',

});

print "CGI\n\n";

timethese(2000, {

'Apache' => 'get ("http://9.95.144.25/cgi-bin/test.pl";)',

'IIS' => 'get ("http://9.95.144.25:90/scripts/test.pl";)',

});

Page 9: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

Other places where Apache is different from (better than) IIS

• Configuration– IIS lets you configure a small set of things.

– Apache lets you configure everything. And what you can’t configure, you can change in the source.

• Extensible– Apache is, IIS isn’t

• Authentication– IIS does authentication against the NT users database. That is, you have to

create an NT user to password protect part of your public web site.

Page 10: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

What other servers are there for NT?

• See http://webcompare.internet.com/ for a large list.

Page 11: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

Differences between Apache on Unix and NT

• Architecture

• Configuration differences

• Authentication

Page 12: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

Architecture

• Unix has one parent process, and forks multiple child processes as needed.

• NT has one parent process, and one child process that is multi-threaded.

Page 13: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

Configuration

• General configuration tips– File paths, drive letters, etc.– / vs \– Where to install it (not a problem any more,

just a habit).

Page 14: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

Configuration directives

AccessConfig and ResourceConfig

AccessFileName

LoadModule

MaxRequestsPerChild

MaxSpareServers and MinSpareServers

ScriptInterpreterSource

Page 15: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

Configuration directives

UserDir

XBitHack

ServerType

Page 16: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

Authentication

• Unix uses Unix crypt, by default

• NT uses MD5 by default

Page 17: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

Running as an NT service

• Running as an NT service– What are NT services?– Installing Apache as a service

apache -i -n Apache -f c:/httpd/conf/httpd.conf

(Or just select it from your Start menu)

apache -u -n Apache (to uninstall)

Page 18: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

NT service

– Starting and stopping the serviceServices dialog (click start or stop)

From the command line:

apache -n “Apache” -k start

apache -n “Apache” -k restart

apache -n “Apache” -k shutdown

Or, the NT ‘net’ command:

net start Apache

net stop Apache

Page 19: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

Console application

• Running as a console application– Starting and stopping the console app

• It’s in your Start menu, in the Apache folder

• To stop, open another DOS window, and type:apache -k shutdown

-- or --

apache -k restart

Page 20: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

But there’s no GUI!!

• We don’t need no stinkin’ GUI!

• But if you really do, use Comanche– A GUI is important on NT, because Windows

users expect to have a GUI. Having on goes a long way towards convincing them that this is a real piece of software. Open Source advocacy is largely about perception, not about reality.

Page 21: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

Apache modules on NT

• Apache modules provided as DLLs (rather like the shared objects option under Unix)

• LoadModule– LoadModule speling_module modules/ApacheModuleSpeling.dll

• mod_perl - get it at ftp://theoryx5.uwinnipeg.ca/pub/other/

Page 22: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

The future of Apache on Windows

• That’s what Bill is here for

Page 23: Apache on Windows Rich Bowen Part I: Installing, configuring, and running Apache on your Windows machines. ApacheCon 2000 7:30pm, March 9th, 2000 Orlando,

For more information

• http://www.apache.org/docs/windows.html

• http://www.rcbowen.com/imho/apache/