Complete Apache installation guide-Linux Enterprise Application-Linux server application information. For more information, see the following section. Abstract: This article discusses how to install apache web servers that support mod_perl, mod_ssl, and php, and install webalizer to analyze web access logs. Guide beginners to edit a secure and fully functional web server system ........
Abstract: This article discusses how to install apache web servers that support mod_perl, mod_ssl, and php, and install webalizer to analyze web access logs. Guide beginners to edit a secure and fully functional web server system.
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
# 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
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
The website www.test.com has the following settings:
DocumentRoot/usr/local/apache/htdocs
AccessFileName. htaccess
AllowOverride All
Ii. Requirements
Requirement: restrict access to the/usr/local/apache/htdocs/usage/directory. Only the user "admin" can access this directory with the password "12345678.
3. Use htpasswd to create User Files
Htpasswd-c/usr/local/apache/. htpasswd admin
This program will ask the user "admin" password, you enter "12345678", take effect twice.
4. Create a. htaccess File
Use vi to create a file. htaccess in the/usr/local/apache/htdocs/usage/directory and write the following lines:
AuthName admin-only
AuthType Basic
AuthUserFile/usr/local/apache/. htpasswd
Require user admin
V. Test
In this case, you can access ghost through a browser.
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