Environment Installation linux+apache+php

Source: Internet
Author: User

Redhat Enterprise Linux (including CentOS Linux) is the most widely used Linux server, and a large number of Web applications are deployed on it. 1. Open the file/etc/httpd/conf/httpd.conf, search for VirtualHost example, find the code as follows:##VirtualHost Example:#almost any Apache directive could go into a VirtualHost container.#The first VirtualHost section was used for requests without a known#server name.##<virtualhost *:80>#ServerAdmin [email protected]#documentroot/www/docs/dummy-host.example.com#ServerName dummy-host.example.com#errorlog Logs/dummy-host.example.com-error_log#Customlog Logs/dummy-host.example.com-access_log Common#</VirtualHost>2. In the example, add a piece of code to specify a domain name for the site.##DocumentRoot is the root directory where the Web site files are stored#ServerName is a site domain name that needs to be consistent with DNS-directed domain names#<virtualhost *:80>ServerAdmin [email protected]-host.example.com documentroot/var/www/httpdocs/demo_neoease_com ServerName Demo. Neoease.com errorlog logs/demo.neoease.com-error.LogCustomlog Logs/demo.neoease.com-access.LogCommon</virtualhost>3. Restart the httpd service and execute the following statement.Service httpd Restart

Apache Virtual Host

Redhat Enterprise Linux (including CentOS Linux) is the most widely used Linux server, and a large number of Web applications are deployed on it.

1. Open the file/etc/httpd/conf/httpd.conf, search for VirtualHost example, find the following code:

## VirtualHost example:# almost any Apache directive could go into a VirtualHost container.# the first Virtualho St section was used for requests without a known# server name.##<virtualhost *:80># ServerAdmin [Email protec ted]# documentroot/www/docs/dummy-host.example.com# ServerName dummy-host.example.com# errorlog logs/dummy-host.
  example.com-error_log# customlog logs/dummy-host.example.com-access_log common#</virtualhost> 

2. As an example, add a section of code to specify a domain name for the site.

## documentroot is the root directory of the Web site files # ServerName is the site domain name, need to be consistent with the DNS point to the domain name #<virtualhost *:80> ServerAdmin [email& Nbsp;protected] documentroot/var/www/httpdocs/demo_neoease_com ServerName demo.neoease.com errorlog logs/demo.ne 
Oease.com-error.log customlog logs/demo.neoease.com-access.log common</virtualhost> 

3. Restart the httpd service and execute the following statement.

Service httpd Restart

Environment Installation linux+apache+php

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.