Web Server @ Home is where this series commenced. This is follow up to that
discussion. Please read it if you want to know motivation behind this
discussion.
Apache2 is the one of the best Web Server out there. And it is free too!! According to Apache Official Site (),
The
Apache HTTP Server Project is an effort to develop and maintain an
open-source HTTP server for modern operating systems including UNIX and
Windows NT. The goal of this project is to provide a secure, efficient
and extensible server that provides HTTP services in sync with the
current HTTP standards.
Apache has been the most popular web server on the Internet since April 1996. The November 2005
found that more than 70% of the web sites on the Internet are using
Apache, thus making it more widely used than all other web servers
combined.
The Apache HTTP Server is a project of the .
Followings are detailed information on how to install Apache2 over cygwin/Windows XP.
Please note that do not install Apache using cygwin setup,
because we want to build Apache for Windows Native Machine because of
performance reasons. Assumed is that all the steps for cygwin
installations are followed as outlined in Web Server @ Home - Installing cygwin.
Download
Apache Source Code. Please do not download from official Apache,
instead use cgywin setup program to download. Patch is required to
build Apache2 on cygwin and that is available via cygwin setup program.
For this
Open cygwin setup.. This is setup.exe which was downloaded first before even cygwain was installed
Go
through all the step till you reach package selection window. Click on
view button until your see full or click on web catagory.
Select Apache 2. Unselect binary and select Source option.
Downloaded
Apache 2 Source is unpacked into /usr/src directory. Please verify all
the packages (as outlined before) are installed including patch &
libtools1.5.
Go to /usr/src directory. Execute 'cd /usr/src'
for this (You probably know it because only UNIX/Linux freaks are going
to do work with cygwin :)
Apply patch by running following command
run apache.xxx.sh prep
apache.xxx.sh provides many options but please do not be tempted and do as exactly told.
cd httpd-xxxx directory and run following configuration script
Above
configuration scripts configures to generate shared loadable modules
and uses Native Windows Socket for Apache Specific System Calls.
Because of Shared Modules Option, Apache server will use only required
amount of memory (Significant, considering if few modules are used and
Apache spawns multiple processes) but performance hit will be of 5%
& initial load time will be little higher.
Native Windows Socket use improves performance by 30%. Big huh!! That's why we wanted to build it by ourselves.
Run
make; make install
Files
will be installed in /usr/local/apache2, See if all directories &
modules are properly installed including lib etc. Look for httpd.exe,
apachectl, aspx in /usr/local/apache2/bin
Check for httpd.conf file in /usr/local/apache2/conf
See if all files in bin directories are executables and have appropriate permissions, if not, change mode using chmod
Go to /usr/local/apache2/conf directory & create a directory called conf.d if it doesn't exists.
Edit conf file for user name and password
Remove any unnecessary module from httpd.conf (Look for AddModules and comment out not required ones)
Go to /usr/local/apache2/bin, edit apachectl and replace httpd2 with httpd
Run following command and look for basic errors. Correct if you can otherwise you can ask me.
apachectl -t
If
everything is okay, run "apachectl -k start", it will start Apache
server. Look for host information/IP information which is printed by
this command.
"apachectl -k start",
Open a browser, type in IP address (host name) of your machine, it should be working now.
I wen't through cygwin mailist list and a couple of solution have been
proposed, but I'm not sure where in the cygwin files it ...
SVTechie Uvach :)
SVTechie 2006-04-06 08:47:18
Sorry for late reply. I am damn busy nowadays and if u can please wait for a
day or two this will be great as I have to investigate this issue. BTW, you
have done good research on net on this issue. I can provide quick help now,
1. Follow http://sourceware.org/ml/cygwin/1999-04/msg00237.html
- Add _WinMain@16 to LIBS
- Add -DWIN32 to CFLAGS
- Above modifications has to made into Makefile (Look for LIBS, CFLAGS
in Makefile, Makefile.rules etc and add these there)
- Note: Makefiles are generated after you run configure. After you have
made changes to Makefiles, please do not run configure again.
- Try it and let me know if you still needs help. Follow second step.
2. Install Apache2 pre-built cygwin binary. Run cygwin setuop file
(setup.exe) and select Apache2 module and install. Performance loss may be
there but for now, you will be up and running. (We can work on above problem
at our leisure
problem installing apache
'Guest' 2006-06-15 08:01:15
hello,
I can't seem to install apache. i get an error --> could not start C:\cygwin\usr\src\apache2-2.2.2-1.sh prep
i followed all the initial install instructions from previous article.
Thanks
Login through Cygwin First
SVTechie 2006-06-15 08:32:51
Look like you are trying to run from Windows Command Prompt. That will not work. Click on Cygwin icon and one window will pop. In this, you can type most of the UNIX commands and that will work.
In this window, go to mentioned directory and then run the command.
If you do not know much about UNIX, best is not to install this way.. use EasyPHP.
re: problem installing apache
'Guest' 2006-06-16 00:23:35
no, im running it inside the cygwin shell.
when executing this --> run apache.xxx.sh prep
an error dialog box appears stating the error i mentioned.
Moved to discussion forum!
SVTechie 2006-06-16 07:59:56
I have moved and replied to this issue in the forum. Please visit
link:http://http://www.svtechie.com/cms/component/option,com_forum/Ite mid,33/page,viewtopic/t,35/
Note: You'll need to register in order to reply in discussion forum.
'Guest' 2006-07-10 09:54:36
./apache.xxx.sh prep
how to install apache 2.2.2 in windows
'Guest' 2006-07-13 06:58:15
pls help me
how to install apache2.2.2 + php5.1.4+ mysql5 in my windowsXP professional pls any mail me
my mail id : t.mathimaran@mail.com (or)
t.mathimaran@gmail.com
Just a note, I also had to install python, and patch just to get it running
Cheers,
waim
Bad system call - apache crashing?
'Guest' 2006-08-22 21:19:37
Very good directions, but quite an arduous process. Three hours later:
./apachectl: line 78: 5084 Bad system call $HTTPD $ARGV
Is this the apache server crashing on startup? The two oddities I found not already mentioned in the comments:
1. I had to install apr1 and aprutil1 to get it to compile and I received the following errors during make:
Info: resolving _apr_month_snames by inking to __imp__apr_month_snames (auto-import)
Info: resolving _apr_day_snames by linking to __imp__apr_day_snames (auto-import)
2. apachectl does not have an httpd2 in it to replace.
I'm not sure if I should thank you for the great directions, or curse you for giving me enough hope to go down this path. Do you have any suggestions?
Thanks,
Doug Green
douggreen at douggreenconsulting.com
Same error here
'Guest' 2006-09-01 23:56:52
I ended up with the same error as Doug:
./apachectl: line 78: 5084 Bad system call $HTTPD $ARGV
Greetings
Matt
Problem
'Guest' 2006-09-02 12:52:36
I managed to start apache2 under cygwin with "net start apache2"
It starts, though the systems thinks, it did not start and give an error.
The problem is, that it therefore cannot be stopped by "net stop apache2".
It seems, that it's impossible to make the cygwin apache2 version compatible to windows service.
'Guest' 2006-09-07 21:49:56
it might sound stupid, but i cannot really find definitions of LIBS and CFLAGS anywhere in makefile to
- Add _WinMain@16 to LIBS
- Add -DWIN32 to CFLAGS
so i did them in the file bulid/config_vars.mk, but appearently that didnt help.
could u tell me how do u guys handle this?
thanks.
B.R.
Chris
'Guest' 2006-10-12 08:31:09
ended up with the same error as Doug:
./apachectl: line 78: 5084 Bad system call $HTTPD $ARGV
'Guest' 2006-10-18 00:45:58
Hello!
If I start httpd2 with the following command (in one line), it works:
CYGWIN=server apachectl2 -k start
( from step 9 in http://lists-archives.org/cygwin/16114-problems-installing-apache-2-2- and-mod_fastcgi.html )
I changed CYGWIN from "server,codepage:oem" to "server" and now I can start httpd2 without trailing CYGWIN=.
Without expilicit setting to "server" I got the same "Bad system call".
If I install httpd2 as service with the following command, I got the "Bad system call", too.
CYGWIN=server cygrunsrv -I httpd2 -d "CYGWIN httpd2" -p /usr/sbin/httpd2 -a "-DNO_DETACH" -y cygserver -e "CYGWIN=server" -s TERM -o
The weird thing is: cygserver is running with the default settings and the global environment contains CYGWIN=server
How can I check if cygserver is *really* running (beside using "net start"
Any idea?
Niels
'Guest' 2006-11-24 23:15:21
I can't even get past the prep stage.
$ ./apache2-2.2.2-1.sh prep
.
(extracts files)
(patches files)
.
found apr source: srclib/apr
found apr-util source: srclib/apr-util
rebuilding srclib/apr/configure
buildconf: checking installation...
buildconf: python version 2.1 (ok)
buildconf: autoconf version 2.60 (ok)
buildconf: libtool not found.
You need libtool version 1.4 or newer installed to build APR from SVN.
./buildconf failed for apr
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Something has broke recently in the version detection of libtool? Or am I missing something here?
'Guest' 2007-02-22 05:21:04
I had the same Winmain@16 issue and couln't manage to compile it properly (couln't find where to define LIBS and CFLAGS).
I succeeded in installing the apache2 package from Cygwin setup, then following instructions at http://www.issociate.de/board/post/237301/apache2_does_not_start_in_cy gwin.html.
I nevertheless had to install the rebase package and run rebaseall command to fix a .so alignment issue on apache2ctl start.
Good luck.
'Guest' 2007-03-06 11:56:22
can anyone tell me y when i type ./configure my computer will run all the files for quite a time then freeze and won't go farter