The main purpose of a web server is to serve basic HTML web pages. Web servers can also serve up applications written in a variety of languages such as Java, PHP, Perl, and many others - all of which Apache supports.
Apache also provides peace of mind with timely security updates, the
ability to serve encrypted pages via SSL (the Secure Socket Layer), and
full standards conformance.
TCP/IP Network configured
The command "rpm -q apache" should return:
apache-1.3.22-4
If it says, "package apache is not installed", then insert CD#1 from your distribution media and type:
rpm -ihv /auto/cdrom/Packages/RPMS/apache-1.3.22-4.i386.rpm
2) Get apache started at boot time
Edit /etc/sysconfig/daemons/httpd and change the ONBOOT="no" to ONBOOT="yes" This will ensure the Apache server starts up at boot time.
Next, either reboot or manually start apache with:
/etc/rc.d/init.d/httpd start
This starts the Apache web server without having to reboot and should not be necessary to run again unless you manually stop the Apache server and want to restart it.
run ps -ef | grep httpd and ensure you have httpd processes running. There will be more than one - this is normal.
# ps -ef | grep httpdroot 4008 1 0 11:11 ? 00:00:01 httpd httpd 4010 4008 0 11:11 ? 00:00:00 httpd httpd 4011 4008 0 11:11 ? 00:00:00 httpd httpd 4012 4008 0 11:11 ? 00:00:00 httpd httpd 4013 4008 0 11:11 ? 00:00:00 httpd httpd 4014 4008 0 11:11 ? 00:00:00 httpd
3) Test the apache server
From a remote host start a web browser and open the hostname or IP address of the Apache web server you have configured. If configured properly you will see a message saying:
Welcome to Caldera OpenLinux 3.1
This is the default home page for Caldera OpenLinux 3.1.1.
The default home page is located in /home/httpd/html/index.html
NOTE: Even though the reply is Welcome to Caldera OpenLinux 3.1, and the OS being used is 3.1.1 - the output is correct. This release of Apache will work on both releases of the Operating System.
There are many options to be configured, but very few usually need to be changed to customise a system.
Options in the httpd.conf file are called Directives. Here is a list of the most commonly modified directives:
DocumentRoot - The Directory you will serve your web pages from. The default is "/home/httpd/html".
MinSpareServers & MaxSpare Servers - Apache will run multiple httpd processes in order to improve performance. You can configure the minimum and maximum number of processes depending on system load and resources available. The default is 5 & 10, but on a heavily loaded system you may want to increase MaxSpare Servers.
Port - If you want to run your web server on anything but the default port 80, change this value. To access a web server on another port from a web browser enter the URL like this:
http://servername.domain:port/
ScriptAlias - Map a directory and allow execution e.g:
ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin"
This will map all requests to http://hostname/cgi-bin/ to a directory "/home/httpd/cgi-bin" and allow execution of user supplied CGI-BIN applications.
Once any changes have been made, the apache web server should be restarted with the following command:
/etc/rc.d/init.d/httpd restart
1) Log into Webmin by selecting Webmin from the KDE Desktop menu. You will be asked for a username and password. Accept the SSL certificate by pressing Continue or Next if prompted. Lastly, log in as root with the root password.
2) Click on Servers, then click on "Apache Webserver". The first time you click on this you will see Reconfigure known Modules. Click on Configure to continue. You will not see this option again.
3) Global configuration options can be configured with the displayed Icons
MinServers/MaxServers: Configure under 'Processes and Limits'
Port : Configure under 'Networking and Addresses'
4) To change options for your default web sever, click on 'Default Server' under 'Virtual Servers'.
5) Via the presented icons, you can change various options relating to the default web server itself:
DocumentRoot - This can be changed under 'Document Options'
ScriptAlias - Configure under 'CGI Programs'
To start Apache with SSL enabled, edit the following file:
/etc/sysconfig/daemons/httpd
Change the line which says:
OPTIONS=""
to
OPTIONS="-DSSL"
Restart the apache server with:
/etc/rc.d/init.d/httpd restart
To test, go to the following URL from your web browser:
https://yourhost/
The web browser you are using may not recognise the authority who signed the demo/test certificate used on Caldera OpenLinux 3.1.1. For testing purposes, accept the certificate. At the end you should be connected to your web server using an encrypted SSL connection.
To receive a digital signature from an accredited source, speak to your ISP, or to one of the providers such as Verisign or Thawte.
The important log files in this directory are:
access_log - details of every web page viewed from your server error_log - details of all errors detected by server
When speaking to your support representative, information from these files are often useful in debugging potential problems.
Many of Apaches basic features are included as modules around the core Apache runtime. These modules are loaded using the LoadModule/AddModule directives. Looking at the default httpd.conf you will see many modules which are automatically loaded.
You will also see a directive called 'Include'. The Include directive will load further configuration files similiar in format to httpd.conf. For instance:
Include /etc/httpd/modules/*.conf
The above Directive loads all the configuration files in the /etc/httpd/modules directory, including the Perl module, the PHP4 module, and the SSL module.
The Apache server distributed with Caldera OpenLinux 3.1.1 includes most of the popular scripting languages and features necessary to run a web server and it would not usually be necessary to add extra modules.
Your web server is now configured and ready to run. Install your html documents under your DocumentRoot directory for users to access them.
Web pages can be created using any HTML editor of your choice. Netscape Communicator included with Caldera OpenLinux 3.1.1 contains an HTML composer. To activate this, go to the Communicator-->Composer options from within Netscape, or press ALT-3 key sequence.
Apache Online Documentation: http://httpd.apache.org/docs/ Apache: The Definitive Guide (Book): http://www.oreilly.com/catalog/apache2/ Apache Modules Registry http://modules.apache.org/ Verisign secure digital signatures http://www.verisign.com/ Thawte secure digital signatures http://www.thawte.com/
Could it be organized more usefully? Did we leave out information you need, or include unnecessary material? If so, please tell us.
To help us implement your suggestions please email:
including relevant details, such as cookbook title and section name.
NOTE: We cannot provide technical support via the above alias. For answers to technical questions, please contact your Caldera Support Provider or visit http://www.caldera.com/support for details of support offerings that are available to you.
Thank you.
Copyright © 2002, Caldera International. All Rights Reserved Worldwide. Caldera International assumes no responsibility for the accuracy or completeness of the information in this document. The use of this information or the implementation of any of these techniques is a customer responsibility and depends upon the customer's ability to evaluate and integrate them into the customer's operational environment. Information in this document is subject to change without notice, and does not imply a commitment on the part of Caldera.
Caldera, the Caldera logos, OpenLinux, and Webmin are trademarks or registered trademarks of Caldera International, Inc. in the USA and other countries. Linux is a registered trademark of Linux Torvaldsl Netscape and Netscape Navigator are trademarks or registered trademarks of Netscape Communications Corporation. All other brand and product names are trademarks or registered marks of the respective owners.
Copyright © 2002, Caldera International, Inc. All Rights Reserved Worldwide.
Caldera Legal: http://www.caldera.com/company/legal