Web Site Services

Source: Internet
Author: User

I. Apache Web Services Foundation

    1. Features: Open source, cross-platform applications, support for a variety of Web programming languages, modular design, very stable operation, good security

    2. Version: 1. X and 2.X

Two. Installing the HTTPD server

    1. Preparation: Uninstall RPM-mode installation of httpd

    2. Source Code Compilation Installation

1) Unpacking

Tar zxf httpd-2.217.tar.gz-c/usr/src

cd/usr/src/httpd-2.2.17

2) configuration

./configure--prefix=/usr/local/httpd--enable-so--enable-rewrite--enable-charset-lite--enable-cgi

--prefix: Specifies which directory the HTTPD service is installed in

--ENABLE-SO: Enable dynamic load module support, enabling httpd to further expand capabilities

3) Compile and install

Make && make install

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/78/3E/wKioL1Z41BLD_ZrmAAB_WgynR8A557.png "title=" Installation Complete " alt= "Wkiol1z41bld_zrmaab_wgynr8a557.png"/>

3. Confirm the installation results

ls/usr/local/httpd650) this.width=650; "Src=" http://s1.51cto.com/wyfs02/M01/78/3F/ Wkiom1z41syqxbz5aaacsruxoyq591.png "title=" Installation Result "alt=" Wkiom1z41syqxbz5aaacsruxoyq591.png "/>

# in the post-installation/USR/LOCAL/HTTPD directory, the main subdirectories are used as follows

/usr/local/httpd/bin: The httpd service of the various execution procedures to ask files, including the main program httpd, service control tools Apachectl and so on.

/usr/local/httpd/conf: A variety of configuration files that store httpd services, including the main profile httpd,conf, enhanced configuration subdirectory extra, and more.

/usr/local/httpd/htdocs: Store Web document, including default home page file Index,htmldeng.

/usr/local/httpd/logs: The date of storage of the HTTPD service to the file.

/usr/local/httpd/cgi-bin: Store various CGI program files.

4. Optimize Execution path

Ln-s/usr/local/httpd/bin/*/usr/local/bin

Ls-l/usr/local/bin/httpd/usr/local/bin/apachectl


650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M00/78/3F/wKiom1Z41L-AAMijAABO0eStLb4798.png "title=" link "alt = "Wkiom1z41l-aamijaabo0estlb4798.png"/>

5. Add httpd system service

Cp/usr/local/httpd/bin/apachectl/etc/init.d/httpd

Vi/etc/init.d/httpd

Chkconfig--add httpd

Chkconfig--llist httpd

Execute/etc/init.d/httpd start start

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/78/3E/wKioL1Z418GymHj8AAAfcxp5uBg311.png "title=" Start "alt = "Wkiol1z418gymhj8aaafcxp5ubg311.png"/>

Three, httpd


Basic configuration of the server

    1. Determine the site name, IP address

      Modify host name and IP address

      Vi/etc/hosts and Vi/etc/sysconfig/network each add a record

Confirm host name 650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/78/3E/wKioL1Z420jC_0mzAAAFASsuCjk948.png "title=" QQ picture 20151222130745.png "alt=" Wkiol1z420jc_0mzaaafassucjk948.png "/>

2. Configure and start the HTTPD service

1) Configure HTTPD service

Vim/usr/local/httpd/conf/httpd.conf

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/78/3E/wKioL1Z42sywKEoHAAAEIuEGefc507.png "title=" QQ picture 20151222130715.png "alt=" Wkiol1z42sywkeohaaaeiuegefc507.png "/>

Check for syntax errors

/usr/local/httpd/bin/apachectl-t

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/78/3F/wKiom1Z4237jn5irAAASQVjuJWM464.png "title=" QQ picture 20151222131108.png "alt=" Wkiom1z4237jn5iraaasqvjujwm464.png "/>

2) Start httpd service

/ETC/INIT.D/HTTPD start

NETSTAT-ANPT | grep httpd

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/78/3F/wKiom1Z42_SRjH1mAAAhbyXr8PA881.png "title=" QQ picture 20151222131310.png "alt=" Wkiom1z42_srjh1maaahbyxr8pa881.png "/>

3. Deploying Web page Documents

There is a default page 650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/78/3E/wKioL1Z43KWjXtbCAAAY-HVry84828.png "title= "QQ picture 20151222131549.png" alt= "Wkiol1z43kwjxtbcaaay-hvry84828.png"/>

4. Accessing the Web site in the client

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/78/3F/wKiom1Z43UOjVxhUAAATjDMgOnY930.png "title=" QQ picture 20151222131846.png "alt=" Wkiom1z43uojvxhuaaatjdmgony930.png "/>

5. View the Web site's access status

Access log

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/78/3E/wKioL1Z43g_DZZB-AABK16E2nHw778.png "title=" QQ picture 20151222132123.png "alt=" Wkiol1z43g_dzzb-aabk16e2nhw778.png "/>

Error log

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/78/3F/wKiom1Z43iWRhc8qAAAea1Fkg-Q675.png "title=" QQ picture 20151222132152.png "alt=" Wkiom1z43iwrhc8qaaaea1fkg-q675.png "/>

Four, httpd.conf configuration file

    1. Global Configuration Items

    2. Zone Configuration Items

Five. Statistics of website visit

Deploy the Awstats Analysis system

    1. Installing the Awstats Package

      Tar zxf awstats-7.3.tar.gz

      MV Awstats-7.3.gz/usr/local/awstats

      650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/78/49/wKiom1Z5Smjgt-DkAAAVQyTD-m4959.png "title=" QQ picture 20151222210415.png "alt=" Wkiom1z5smjgt-dkaaavqytd-m4959.png "/>

    2. Establish a profile for the site to be counted

      Cd/usr/local/awstats/tools

      chmod +x awstats_configure.pl

      ./awstats_configure.pl

      650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/78/48/wKioL1Z5T7vwUKs5AABAdN_prds051.png "title=" QQ picture 20151222212644.png "alt=" Wkiol1z5t7vwuks5aabadn_prds051.png "/>

1) Specify the path to the httpd master configuration file

/usr/local/httpd/conf/httpd.conf

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/78/49/wKiom1Z5T8Swl-FRAABFRtz5uE4543.png "title=" QQ picture 20151222212613.png "alt=" Wkiom1z5t8swl-fraabfrtz5ue4543.png "/>

2) Set the log type

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/78/48/wKioL1Z5UCfDp2AuAACL2I4DKnQ312.png "title=" QQ picture 20151222212832.png "alt=" Wkiol1z5ucfdp2auaacl2i4dknq312.png "/>


3) Create a profile for the specified Web site

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/78/49/wKiom1Z5UOzhSDmHAAA0rZLDJ2k509.png "title=" QQ picture 20151222213218.png "alt=" Wkiom1z5uozhsdmhaaa0rzldj2k509.png "/>

3. Modify the Site statistics configuration file

Vi/etc/awstats/awstats.www.local.com.conf

Adding in the configuration file

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/78/48/wKioL1Z5UkfQ2RNvAAAUXeM8-NQ839.png "title=" QQ picture 20151222213745.png "alt=" Wkiol1z5ukfq2rnvaaauxem8-nq839.png "/>

Mkdir/var/lib/awstats

4. Perform log analysis and set cron schedule opportunities

chmod +x awstats_updateall.pl

./awstats_updateall.pl.now

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/78/49/wKiom1Z5U5SRHwb2AAB2GFDQe8E724.png "title=" QQ picture 20151222214336.png "alt=" Wkiom1z5u5srhwb2aab2gfdqe8e724.png "/>

Scheduled tasks can be set through the Crond service

Crontad-e

Add to

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/78/49/wKiom1Z5VKyhb2CWAAAMqB5Q9KA165.png "title=" QQ picture 20151222214807.png "alt=" Wkiom1z5vkyhb2cwaaamqb5q9ka165.png "/>

/etc/init.d/crond start

Chkconfig--level Crond on

Access to the Awstats analysis system

Vim/usr/local/local/httpd/htdocs/local.html

Create an automatic jump HTML page in the Web root directory to access http://www.local.com/local.html directly

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/78/48/wKioL1Z5VmPCKcXBAAArqX3qqFk183.png "title=" QQ picture 20151222215422.png "alt=" Wkiol1z5vmpckcxbaaarqx3qqfk183.png "/>

Awstats statistics page of the log analysis system

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/78/48/wKioL1Z5V6eR_NUbAAFj1FW1xu8644.png "title=" QQ picture 20151222220038.png "alt=" Wkiol1z5v6er_nubaafj1fw1xu8644.png "/>





This article from the "Linux" blog, reproduced please contact the author!

Web Site Services

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.