Linux Apache build Web Service

Source: Internet
Author: User

This experiment is the RPM installation of the download source package very painful ... Configure not out of makefile online also no good solution seems to be no APR runtime knows how I used to install Linux. I'm using the RPM.

I. installing with the source code (I'm just showing how to install it) so unload the httpd that comes with me.

RPM-E httpd If you need to resolve dependencies with--nodeps

RPM-E httpd--nodeps, there's a full uninstall of httpd under inspection.

2.

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/> extract it to/USR/SRC and configure the compilation installation

Configuration

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s3.51cto.com/wyfs02/m01/4d/f3/wkiom1rcz4icox0faacyzqvcerg855.jpg "title=" Fdae9c93abc74d3f833bacfd704d50f7.png "alt=" Wkiom1rcz4icox0faacyzqvcerg855.jpg "/>

--prefix: Specifying a path

--ENABLE-SO: Enable dynamic load module for HTTPD with extended functionality

--enable-rewrite: Enable the network address rewriting feature for site-optimized directory migrations.

--enable-charset-lite: Enables string support to support various characters on a Web page.

--ENABLE-CGI: Enable CGI scripting to support the extended Web site's app access capabilities.

Compile and install: Make && make install

Second, the RPM installation you understand. RPM-UVH httpd-2. XXXXX. rpm

The main configuration of the main configuration file this block

After installing the main configuration file with RPM in/etc/httpd/httpd.conf This is the master profile

/var/www/html This is the default page

------------------------------------------------------------------------------------

Master Profile Basic Parameters

DirectoryIndex index.html Index.html.var//Default document

root directory of the SERVERROOT:HTTPD server

Listen: Listening Port default 80

User: The default is Deamon when you run the HTTPD server process

Group:-------------------------------identity is---------by default


ServerAdmin: Set httpd server Administrator e-mail

Full hostname (hostname + domain name) of the SERVERNAME:HTTPD site

DocumentRoot: Site root directory


<directory/>//This is the beginning of the area

Options followsymlinks//control option

Order Deny,allow//access Policy application sequence

Deny from Alla//Deny All

</directory>//Area End


----------------------------------------------------------------------------------------------

Create a virtual host

The point is to create a virtual host:

First you need to create a separate configuration file! (No DNS first write hosts)

Domain-based virtual hosting:

(PS::: If the virtual site is a lot of it, then create a separate configuration file vim/etc/httpd/conf/xxxxx.conf It is best to stay in HTTP as long as it is loaded in the main configuration file can be

Specifically Jiangzi:Include conf/your own set of directories .../xxxx.conf write in the main config file!! )


<directory "/var/www/html" >
Order Allow,deny
Allow from all
</Directory>

Namevirtualhost 192.168.1.100
<virtualhost 192.168.1.100>
Documentroot/var/www/html/benetcom
ServerNamewww.benet.com
# errorlog logs/Www.benet.com.error_log//These two lines are very painful. It's true. Error log I use rpm HTTP without log ...
#CustomLog logs/Www.benet.com/access_logCommon //If you have, you can keep the two lines of source package installation. You can actually build it yourself .
</VirtualHost>


<virtualhost 192.168.1.100>
Documentroot/var/www/html/accpcom
ServerNamewww.accp.com
#ErrorLog logs/Www.benet.com.error_logDitto
#CustomLog logs/Www.benet.com/access_logcommon//Ibid.
</VirtualHost>

IP-based virtual hosts:

First comment out: namevirtualhost This line (if the previous domain-based, there is no need to set the listening address)

Just change the IP address in the back of the <virtualhost 192.168.1.100> .

Don't have two NICs? That's a virtual host with one!!


Port-based virtual hosts:

First comment out: namevirtualhost This line (if the previous domain-based, there is no need to set the listening address)

Just put <virtualhost 192.168.1.100:8353> and add a port to the back like 8353 .

Then write on the listening port number is best in the main configuration file listen overwrite otherwise said Port has been occupied or watch out of the existing listen 80 is OK

Yes, I covered it.

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>


This article is from the IT Technology blog blog, so be sure to keep this source http://xingxingxingxin.blog.51cto.com/4794205/1574213

Linux Apache build Web Service

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.