Full Installation Guide for Apache Web Servers

Source: Internet
Author: User
Tags install openssl

Required Software
Apache_1.3.20.tar.gz home: http://www.apache.org
Mod_perl-1.26.tar.gz home: http://perl.apache.org
Openssl-0.9.6b.tar.gz home: http://www.openssl.org
Mod_ssl-2.8.4-1.3.20.tar.gz home: http://www.modssl.org
Php-4.0.6.tar.gz home: http://php.apache.org
Webalizer-2.01-06-src.tgz home: http://www.mrunix.net/webalizer
Gd-1.8.4.tar.gz home: http://www.boutell.com/gd
In addition, the system must install the following rpm packages:
Libpng-devel zlib-devel libjpeg-devel
You can run the rpm-qa grep libpnp command to check whether the system has these rpm packages installed. If not, load the redhat installation disc and install these rpm packages in/mnt/cdrom/RedHat/RPMS.
Step 1: Install openssl
1. Unzip the software:
# Tar xvfz openssl-0.9.6b.tar.gz
2. Installation
# Cd openssl-0.9.6b #./config # make test # make install
Step 2: Install mod_ssl
1. Unzip mod_ssl
# Tar xvfz apache_1.3.20.tar.gz # tar xvfz mod_ssl-2.8.4-1.3.20.tar.gz
2. Install mod_ssl
# Cd mod_ssl-2.8.4-1.3.20 #./configure-with-apache = ...... /Apache_1.3.20
Step 3: Install mod_perl
1. Extract
# Tar xvfz mod_perl-1.26.tar.gz
2. Installation
$ Perl Makefile. pl everything = 1 APACHE_SRC = ...... /Apache_1.3.20/src USE_APACI = 1 PREP_HTTPD = 1 DO_HTTPD = 1 $ make install
Step 4: Configure apache
# Cd apache_1.3.20 #./configure
Step 5: install php
1. Extract
# Tar xvfz php-4.0.6.tar.gz
2. Installation
# Cd php-4.0.6 # CFLAGS = '-O2-I/usr/local/ssl/include/openssl' #./configure-with-apache = ...... /Apache_1.3.20-with-mysql-with-gd = ...... /Gd-1.8.4-enable-memory-limit = yes-enable-debug = no # gmake install
Step 6: install apache
# SSL_BASE = ...... /Openssl-0.9.6b #. /configure-enable-module = ssl-activate-module = src/modules/perl/libperl. a-enable-module = perl-activate-module = src/modules/php4/libphp4.a-enable-module = php4 # make certificate # make install
Step 7: Install gd
# Make all # cp libgd. a/usr/lib # cp gd *. h/usr/include/
Step 8: Install webalizer
1. Extract
# Tar xvfI webalizer-2.01-06-src.tar.bz2
2. Installation
# D webalizer-2.01-06 #./configure # make install
3. Configuration
Rename webalizer. conf. sample Under/etc/to webalizer. conf.
Modify the following content based on the actual Server:
LogFile/usr/local/apache/logs/access_log
Set the location of the www access log file
OutputDir/usr/local/apache/htdocs/usage
Set the web Access statistics output directory
HistoryName webalizer. hist
Incremental yes
HostName www.test.com
PageType htm * PageType cgiPageType phtmlPageType php3PageType plPageType jsp
4. Set a cron task
Add the following content at the end of the/etc/crontab file:
02 4 *** root/usr/local/bin/webalizer
You can.
5. Create an output directory
# Mkdir/usr/local/apache/htdocs/usage
Step 9: Protect access statistics from unauthorized access
We certainly do not want our Website access statistics to be browsed by others at will. Therefore, we need to protect the usage directory and only allow access by legal users.
I. Conditions
"/" Is set to ocumentRoot/usr/local/apache/htdocsAccessFileName. htaccessAllowOverride All
Ii. Requirements
Requirement: restrict access to the/usr/local/apache/htdocs/usage/directory, and only allow "admin" to access this directory with "12345678" as the password.
3. Use htpasswd to create User Files
Htpasswd-c/usr/local/apache/. htpasswd admin
This program will ask the user's "admin" password. You enter "12345678" and the password will take effect twice.
4. Creation. Htaccess File
Use vi to create a file in the/usr/local/apache/htdocs/usage/directory. Htaccess: Write the following lines:
AuthName admin-onlyAuthType BasicAuthUserFile/usr/local/apache/. htpasswdrequire user admin
V. Test
In this case, you can access ghost through a browser.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.