It is presently the most popular web-server on the internet and comes with convenient, enhanced functionality not easily available on other web-servers. This includes a powerful redirection meta-language as well as fixing up common spelling errors. Perl can also be compiled inside the server to provide extra increases in performance for Perl based scripts
There is a large base of on-line, web and newsgroup based help; as well as technical books (including an "Apache for Dummies" book). This means problems can generally be solved relatively quickly (unless they are due to nuances with the SGI IRIX operating system and Apache - which have happened). Linux (or more likely FreeBSD UNIX) on PC is probably a better system to use than an SGI O2 as it has a wide user base; but an SGI O2 was chosen as this type of system is supported at the Daresbury Laboratory.
As of writing this (1st August 2003), Apache 1.3.28 was recently announced and mainly to keep ahead of the script kiddie hackers, it was time to upgrade from 1.3.27. Thus (based on Apache.org recommendations) 1.3.27 was upgraded to 1.3.28.
From: email@example.com (Walter Roberson) Newsgroups: comp.sys.sgi.admin,comp.infosystems.www.servers.unix Subject: Re: Compiling Apache on irix 6.5 Date: 6 Jun 1999 17:23:46 GMT Organization: National Research Council Canada In article [375A81B9.5E549176@who.net], [firstname.lastname@example.org] wrote: :I am stuck while trying to compile Apache 1.3.6 on an origin 200 running :irix 6.5 - I am relatively new to unix. I can't even start compiling, :ld32: FATAL 9: I/O error (/usr/lib32/crt1.o): No such file or directory :What exactly is ld32? And what is the system missing :(/usr/lib32/crt1.o)? ld32 is the linker for object files that are in N32 format. Your problem is that you have failed to load dev.sw.lib from the IDF (Integrated Development Foundation) CD that came with IRIX 6.5. Be sure to load both the IDF and IDL (Integrated Development Library) CDs. You will probably need to open /CDROM/dist/dist6.5 instead of just
(Note: Before attempting an upgrade, backup the currently running Apache installation so it can be re-enabled if things go wrong) Be wary that obviously upgrading the OS can put you into possible strife as well.
This can be done by "mkdir /usr/local/apache/apache-1.3.11.old";
going into the /usr/local/apache directory and using the
tar cf - . | (cd /usr/local/apache/apache-1.3.11.old ; tar xpf - )
Be wary that if you have much in the way of log files, this could be a GIG or so extra on your hard-disk.
On entering the website, it is possible to go to a close mirror site, of which there are many all over the place. You can find a closer mirror site automatically using the Apache "find a closer mirror site" CGI script at http://www.apache.org/dyn/closer.cgi.
The Apache distribution directory is at http://httpd.apache.org/dist/httpd/. Download the apache_1.3.28.tar.gz (or .Z) file. (It is possible to get binaries).
Possible problems with mod_throttle on SGI IRIX.
Date: Wed, 23 Feb 2000 08:14:21 +0100 From: Anthony Howe [email@example.com] To: Lachlan Cranswick [firstname.lastname@example.org] Subject: Re: Mod throttle on apache 1.3.11 and SGI O2 IRIX 6.5.6? The mod_throttle uses shared memory. I'm not familar with the SGI machine, but if it uses POSIX API instead of SysV API, then you're using untested code and I've already had reports that it doesn't work and no time/access to fix it. Also because of the shared memory keys I use you can only have one parent server/mod_throttle pair per machine since additional instances of mod_throttle try and allocate teh same block of shared memory. My guess is SGI is a nice machine using the POSIX API and thus needs debugging on my part. (I wish Linux used POSIX cause then I could fix it to use the standard.) In the interim I recommend you have a look at mod_bandwidth. Anthony Howe
"Mod_Throttle User specific throttling for Apache 1.2.x Cut to the chase I'll admit it - I've been web master for a number of adult sites, some professional and some personal. One thing you can be certain of with sites with adult content is that you're going to have traffic. The first site I set up on a personal basis sat behind a 28.8kbps modem link, what a mistake. As soon as the site was discovered, it was saturated. I upgraded to 128kbps frame relay link and swamped it within a week or so as well. After a bit, I had to upgrade to 384kbps, but no joy. At that point I had to grit my teeth and go all the way to T1. One thing about T1 links is that they are expensive, and I started selling web hosting to support my habit. Unfortunately, on the first night at T1 speeds, I got a rather irate phone call from my up stream provider. It seemed I was maxing out the link and was all my my lonesome swamping the Cisco 2500 that I was attached to. ...stuff deleted... In the end I wrote mod_throttle. Mod_throttle started as a series of hacks on mod_limit, but there's very little code left from it at this point. Mod_throttle's main function is to set average Bps limits for individual customers. It also supports a greatly enhanced version of mod_limit's status display, so you can actually see who's pushing the envelope. Mod_throttle works by inserting increasingly long delays in service when a user is over their limit. How well does it work? For me it works marvelously. It's reduced the memory/cpu loads on my server by two-thirds and keeps the users exactly in their limits with as little pain as possible."
To extract the apache distribution file type either
This creates an apache_1.3.28 subdirectory. Go into this directory and then go into the src subdirectory (cd apache_1.3.28/src).
Configuring the Configuration file
Run Configure script in the src directory (type ./Configure) and this will setup the makefile ready compiling. It may give you a warning saying this is not what you want. Yes it is, unless you want to install the software somewhere else where you would use the command specified in the INSTALL file. Be wary than when upgrading from previous versions of Apache, the latest Apache by default installs the binaries into /usr/local/apache/bin and the configuration files into /usr/local/apache/conf. These can be over-ridden.
Run make to compile the apache server and create the executables.
The following may have to be done in "superuser/root" mode.
Assuming everything when nicely, run make install to copy a lot of files into the /usr/local/apache/ area. This includes:
Example Config Files
The CCP14 root web page area starts from a directory called:
One thing to note is that this directory is not the root area for http://www.ccp14.ac.uk. Because the CCP14 server uses virtual domains, it is best to have a fall back directory where very old web browsers will go that do not recognise the virtual domain name protocol. This is the equivalent of going to the sv1.ccp14.ac.uk webserver (the real name of the O2 computer) where you are encouraged to upgrade to a relatively modern web browser but also have the possibility of browsing around from this area into the CCP14 web area using your old browser.
Other decisions are how to setup virtual domains, of which the domain names have to be inserted into the DNS. The network administrator would normally implement this. The virtual domains have been devided in such a way that people who would only want to mirror the roughly crystallographic part of the webserver could do so.
The main configuration stages for apache 1.3.28 are:
Unlike previous versions of Apache, most of the config is now in the httpd.conf file.
Generally most of the Apache options are safe but options and information has to be set before the server will run correctly:
NB: If the variable is not mentioned, it is most likely the default is being used though most of the following is using the default.
Section 1: Global Environment
Section 2: 'Main' server configuration
From: email@example.com (Amitai Schlair) Newsgroups: comp.infosystems.www.servers.unix Subject: Re: Apache and FTP Server. Help needed. Date: Mon, 29 Nov 1999 18:57:39 -0500 Joshua Slive <firstname.lastname@example.org> wrote: > root
wrote: > > > I would like to reach my ftp site by going in > > http://eth1.dyndns.org/pub. > > > > How could I do that? > > Alias /pub/ /path/to/pub/ As distributed, the Apache configuration defaults to a MIME type of text/plain if it can't determine a file's type. For an FTP archive, you might also want to configure something like the following: <Location /pub> DefaultType application/octet-stream </Location>
<Directory /> Options FollowSymLinks order deny,allow AllowOverride None </Directory>(The defaults tend to be a set of restrictive permissions so you have to explicitely enable the permissions below)
<Directory /*/public_html> AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec <Limit GET POST OPTIONS PROPFIND> Order allow,deny Allow from all </Limit> <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> Order deny,allow Deny from all </Limit> </Directory>(Permissions set to be quite restrictive on user directories)
<Files .htaccess> Order allow,deny Deny from all </Files>(stop people browsing the contents of the .htaccess files as this usually contains somes security information. Various tricks can also be done using Mod_Rewrite redirector.)
<Directory /usr/local/apache/share/cgi-bin> AllowOverride None Options +ExecCGI -Indexes #means people cannot browse directories #but can run the CGI scripts </Directory> <Directory /usr/local/rib> AllowOverride None Options +ExecCGI -Indexes #means people cannot browse directories #but can run the CGI scripts order allow,deny allow from all </Directory> <Directory /usr/local/rib/cgi-bin/admin> AllowOverride All #Means you can define a .htaccess file #that only people who supply a username and password #can do things in the admin area Options +ExecCGI +Indexes #means directories can be browsed #and can also run the CGI scripts order deny,allow deny from all allow from .dl.ac.uk #In theory, only people from these allow from .ccp14.ac.uk #domains can work in the RIB admin area </Directory>Then in the /usr/local/rib/cgi-bin/admin directory have a .htaccess file with the following contents. (thanks to RIB people at http://www.nhse.org for help with this .htaccess file.
AuthUserFile /usr/local/apache/doobry-twang/doobry/.htpasswd #not real directory AuthGroupFile /dev/null AuthName doobryribusername #not real username - use something you can remember (6 to 8 characters is good) AuthType Basic </Limit GET> require user doobryribusername #not real username - use something you can remember (6 to 8 characters is good) </Limit> <Limit POST> require user doobryribusername #not real username - use something you can remember (6 to 8 characters is good) </Limit> </Directory>Then in the /usr/local/apache/etc/doobry-twang/doobry directory (give it a name you know of) have a .htpasswd file with the following contents. (again, thanks to RIB people at http://www.nhse.org for help with this .htaccess file.
doobryribusername:kdinsldkldfkLeave the encrypted password blank if you just want to enter a username and no password. (not recommended) Otherwise, just use the UNIX crypt command to generate your encrypted password to insert into the .htpasswd file.
Then, providing you have access permissions (and the username and password), you can go into http://www.ccp14.ac.uk/rib/cgi-bin/admin/RIB.pl to administer the RIB system. (but not yet as you have not added the following into mime.types, application/x-httpd-cgi pl
# # Customizable error response (Apache style) # these come in three flavors # 2) local redirects ErrorDocument 404 /bad-link.html # Doing a relative link tells Apache to keep the old address on the browser window # to redirect to local URL /missing.html(the above could be non-optimal but works for me)
Setting up server-status and server-info
<Location /server-status> SetHandler server-status order deny,allow deny from all allow from .dl.ac.uk allow from .ccp14.ac.uk </Location>
<Location /server-status> SetHandler server-status order deny,allow deny from all allow from .dl.ac.uk allow from .ccp14.ac.uk </Location> <Location /server-info> SetHandler server-info order deny,allow deny from all allow from .dl.ac.uk allow from .ccp14.ac.uk </Location>
<VirtualHost 18.104.22.168> ServerAdmin email@example.com DocumentRoot /web_disc/ccp14/web_area ServerName sv1.ccp14.ac.uk # Redirect people who access admin areas somewhere else - possibly dodgy way of doing this # but did read on comp.infosystems.www.servers.unix that other people were doing this. RewriteEngine on RewriteRule ^/cgi-bin/$ /bad-link.html [R] RewriteRule ^/.htaccess /bad-link.html [R] RewriteRule ^/csiro/(.*) http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/bin/(.*) http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/dev/(.*) http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/etc/(.*) http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/xrd/(.*) http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/coffeeclub/(.*) http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/mirrorbin/(.*) http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/lib/(.*) http://www.ccp14.ac.uk/bad-link.html [L,R] </VirtualHost>
<VirtualHost 22.214.171.124> ServerAdmin firstname.lastname@example.org DocumentRoot /web_disc/ccp14/web_area/web_live ServerName www.ccp14.ac.uk Alias /rib/ /usr/local/rib/ ScriptAlias /cgi-bin/ /usr/local/apache/share/cgi-bin/ccp14/ ScriptAlias /rib/cgi-bin/ /usr/local/rib/cgi-bin/ RewriteEngine on RewriteRule ^/cgi-bin/$ /bad-link.html [R] #take that! - extra trick to limit people #browsing cgi-bin and related directories. RewriteRule ^/rib/$ /bad-link.html [R] RewriteRule ^/.htaccess /bad-link.html [R] RewriteRule ^/~icons/(.*) /icons/$1 [R] RewriteRule ^//(.*) /$1 [R] #the www.dl.ac.uk/CCP/CCP14 redirect seems to add an extra slash - #so quick kludge to fix this up RewriteRule ^/CCP/CCP14/(.*) http://www.ccp14.ac.uk/$1 [R] #In case people still have the www.dl.ac.uk/CCP/CCP14 mindset #The following is to redirect information mirrored under www.dl.ac.uk/CCP/CCP14 #Into their own virtual domains. RewriteRule ^/ccp/ccp14/ftp-mirror/programming/(.*) http://programming.ccp14.ac.uk/ftp-mirror/programming/$1 [R] RewriteRule ^//ccp/ccp14/ftp-mirror/programming/(.*) http://programming.ccp14.ac.uk/ftp-mirror/programming/$1 [R] RewriteRule ^/ccp/web-mirrors/bgmn/mineralogie/bgmn/(.*) /ccp/web-mirrors/bgmn/$1 [R] RewriteRule ^/ccp/web-mirrors/ill-hewat/dif/icsd/(.*) http://icsd.ccp14.ac.uk/icsd/$1 [R] RewriteRule ^//ccp/web-mirrors/ill-hewat/dif/icsd/(.*) http://icsd.ccp14.ac.uk/icsd/$1 [R] RewriteRule ^/ccp/web-mirrors/programming/gnu/(.*) http://gnu.ccp14.ac.uk/$1 [R] RewriteRule ^//ccp/web-mirrors/programming/gnu/(.*) http://gnu.ccp14.ac.uk/$1 [R] RewriteRule ^/ccp/web-mirrors/alife/santafe/(.*) http://www.santafe.edu/$1 [R] RewriteRule ^//ccp/web-mirrors/alife/santafe/(.*) http://www.santafe.edu/$1 [R] RewriteRule ^/ccp/ccp14/ftp-mirror/alife/santafe/(.*) ftp://ftp.santafe.edu/$1 [R] RewriteRule ^//ccp/ccp14/ftp-mirror/alife/santafe/(.*) ftp://ftp.santafe.edu/$1 [R] RewriteRule ^/ccp/web-mirrors/alife/(.*) http://alife.ccp14.ac.uk/$1 [R] RewriteRule ^//ccp/web-mirrors/alife/(.*) http://alife.ccp14.ac.uk/$1 [R] RewriteRule ^/ccp/ccp14/ftp-mirror/programming/(.*) http://programming.ccp14.ac.uk/ftp-mirror/programming/$1 [R] RewriteRule ^//ccp/ccp14/ftp-mirror/programming/(.*) http://programming.ccp14.ac.uk/ftp-mirror/programming/$1 [R] RewriteRule ^/ccp/ccp14/ftp-mirror/alife/(.*) http://alife.ccp14.ac.uk/ftp-mirror/alife/$1 [R] RewriteRule ^//ccp/ccp14/ftp-mirror/alife/(.*) http://alife.ccp14.ac.uk/ftp-mirror/alife/$1 [R] RewriteRule ^/ccp/web-mirrors/programming/nhse/(.*) http://www.nhse.org/$1 [R] RewriteRule ^//ccp/web-mirrors/programming/nhse/(.*) http://www.nhse.org/$1 [R] RewriteRule ^/ccp/web-mirrors/programming/netlib/(.*) http://netlib.ccp14.ac.uk/$1 [R] RewriteRule ^//ccp/web-mirrors/programming/netlib/(.*) http://netlib.ccp14.ac.uk/$1 [R] RewriteRule ^/ccp/web-mirrors/programming/(.*) http://programming.ccp14.ac.uk/$1 [R] RewriteRule ^/~louis/(.*) /ccp/web-mirrors/farrugia/~louis/$1 [R] RewriteRule ^/ccp/web-mirrors/programming/(.*) http://programming.ccp14.ac.uk/$1 [R] RewriteRule ^/ccp/ccp14/ftp-mirror/gsas/$ /ccp/ccp14/ftp-mirror/gsas/public/gsas/ [R] RewriteRule ^/ccp/ccp14/ftp-mirror/gsas/[A-Z](.*) /ccp/ccp14/ftp-mirror/gsas/public/gsas/ [R] RewriteRule ^/ccp/ccp14/ftp-mirror/programming(.*) http://programming.ccp14.ac.uk/ftp-mirror/programming$1 [R] RewriteRule ^//ccp/ccp14/ftp-mirror/programming(.*) http://programming.ccp14.ac.uk/ftp-mirror/programming$1 [L,R] </VirtualHost>
<VirtualHost 126.96.36.199> ServerAdmin email@example.com DocumentRoot /web_disc/ccp14/web_area/netlib ServerName netlib.ccp14.ac.uk ScriptAlias /cgi-bin/ /usr/local/apache/share/cgi-bin/netlib/ RewriteEngine on RewriteRule ^/cgi-bin/$ http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/.htaccess http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/cgi-bin/(.*) http://www.netlib.org/cgi-bin/$1 [L,R] </VirtualHost>
<VirtualHost 188.8.131.52> ServerAdmin firstname.lastname@example.org DocumentRoot /web_disc/ccp14/web_area/gnu ServerName gnu.ccp14.ac.uk RewriteEngine on RewriteRule ^/cgi-bin/$ http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/.htaccess http://www.ccp14.ac.uk/bad-link.html [R] ScriptAlias /cgi-bin/ /usr/local/apache/share/cgi-bin/gnu/ </VirtualHost>
<VirtualHost 184.108.40.206> ServerAdmin email@example.com DocumentRoot /web_disc/ccp14/web_area/gnuftp ServerName gnuftp.ccp14.ac.uk RewriteEngine on RewriteRule ^/cgi-bin/$ http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/.htaccess http://www.ccp14.ac.uk/bad-link.html [R] ScriptAlias /cgi-bin/ /usr/local/apache/share/cgi-bin/gnuftp/ </VirtualHost>
<VirtualHost 220.127.116.11> ServerAdmin firstname.lastname@example.org DocumentRoot /web_disc/ccp14/web_area/alife ServerName alife.ccp14.ac.uk RewriteEngine on RewriteRule ^/cgi-bin/$ http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/.htaccess http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/swarm/projects/swarm/old/(.*) http://www.santafe.edu/projects/swarm/old/$1 [R] RewriteRule ^/swarm/projects/swarm/users/(.*) http://www.santafe.edu/projects/swarm/users/$1 [L,R] ScriptAlias /cgi-bin/ /usr/local/apache/share/cgi-bin/alife/ ErrorLog logs/error_log TransferLog logs/access_log </VirtualHost>
<VirtualHost 18.104.22.168> ServerAdmin email@example.com DocumentRoot /web_disc/ccp14/web_area/programming ServerName programming.ccp14.ac.uk RewriteEngine on RewriteRule ^/cgi-bin/$ http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/.htaccess http://www.ccp14.ac.uk/bad-link.html [R] RewriteRule ^/cgi-bin/netlibget.pl/(.*) http://www.netlib.org/cgi-bin/netlibget.pl/$1 [R] RewriteRule ^/ftp-mirror/programming/wxwindows/pub/packages/wxwin/(.*) /ftp-mirror/programming/wxwindows/pub/wxwin/$1 [R] RewriteRule ^/ftp-mirror/programming/cygnus-gnu-win32/pub/gnu-win32/(.*) /ftp-mirror/programming/cygwin/pub/cygwin/$1 [R] RewriteRule ^/ftp-mirror/programming/cygnus-gnu-win32/(.*) /ftp-mirror/programming/cygwin/$1 [R] RewriteRule ^/netlib/(.*) http://netlib.ccp14.ac.uk/$1 [R,L] ScriptAlias /cgi-bin/ /usr/local/apache/share/cgi-bin/programming/ </VirtualHost>
<VirtualHost _default_:80> ServerAdmin firstname.lastname@example.org DocumentRoot /web_disc/ccp14/web_area ErrorLog logs/default_error_log CustomLog logs/default_access_log combined </VirtualHost>
The mime.types file sets the file extensions that the apache web server will properly recognise. Normally this is kosher but a few things seem to be missing that have to be added manually(?).
text/html html htm
application/x-compress Z application/x-gzip gz
application/octet-stream bin dms lha lzh exe class rd sd raw text/plain txt text
The same goes with an old address on the gserv1.dl.ac.uk machine such this it also redirects correctly. http://gserv1.dl.ac.uk/CCP/CCP14/
You must be in Super User/root mode to do the following:
To Restart (i.e., stop then quickly start it up again):
/usr/local/apache/bin/apachectl stopTo Start:
If upgrading to a new version of the webserver, "apachectl restart" may not be good enough and you may have to do "apachectl stop" the "apachectl start" for the new version to get put into memory over the old version.
What can be said, whatever family that IRIX UNIX comes from, it sucks and it is no wonder Bill Gates is a billionaire selling Windows. Putting something to automatically start up is not that trivial and following is a possibly dodgy implementation. Basically, it seems it is commond just to copy the lpd deamon script the /etc/init.d directory (which then has a link put to it from the /etc/rc2.d directory). Then edit in Apache, and edit out LPD.
Thus as root go into the /etc/init.d directory and copy the relevant file; In this case on the CCP14 Server; cp bsdlpr httpd. Make sure it is exectuable (chmod +x httpd).
Change the script so you pretty much get something like the following (start-script.txt).
Then type ln -s /etc/init.d/httpd /etc/rc2.d/S62httpd (giving the link a number after the LPR deamon showing the order it will be started up in)
Then (still as root), type cp /etc/config/bsdlpr /etc/config/httpd
Then type ln -s /etc/config/httpd /var/config/httpd
In theory, /etc/chkconfig can then be used to check on the status of things. If httpd does not appear by typing chkconfig, try chkconfig httpd on
(Summary of all of this, next killer apps for UNIX will be "c:\config.sys" and "c:\autoexec.bat")
From: "Andrew" [email@example.com] Newsgroups: comp.infosystems.www.servers.unix Subject: Re: Do I need Apache after installing Linux6.1 ? Date: Sat, 16 Oct 1999 23:27:22 GMT RedHat 6.1 comes with Apache... Your configuration files are in /etc/httpd/conf The log files are in /var/log/httpd The default location for web content is /home/httpd To start the server, run /etc/rc.d/init.d/httpd start To stop the server, run /etc/rc.d/init.d/httpd stop To reset the server do this: kill -HUP `cat /var/run/httpd.pid` If you don't seem to have it installed, simply use RPM to install it. >I have just installed RedHat Linux 6.1. It seems that a web server is >included in Linux6.1. Is that right? Do I need to install Apache 1.3.9 >after installing Linux6.1 ? > >Thanks for your help. > >--Wu
Another method is Telnet to the server and check if it is running that way.
type /usr/bsd/telnet www.ccp14.ac.uk 80 [RETURN](80 stands for port 80) type HEAD / HTTP/1.0 (type [RETURN] twice)You should get the output of something akin to the following on your terminal:
sv1 227% /usr/bsd/telnet www.ccp14.ac.uk 80 Trying 22.214.171.124... Connected to sv1.ccp14.ac.uk. Escape character is '^]'. HEAD / HTTP/1.0 HTTP/1.1 200 OK Date: Wed, 19 Jun 2002 01:25:22 GMT Server: Apache/1.3.28 (Unix) Last-Modified: Fri, 03 Nov 2000 23:57:51 GMT ETag: "cc469eb-1b14-3a0350ff" Accept-Ranges: bytes Content-Length: 6932 Connection: close Content-Type: text/html Connection closed by foreign host. sv1 228%