Apache virtual host configuration and web page encryption

Source: Internet
Author: User
Install apache in the source code, skip this step: first enable the VM function [root @ localhost ~] # Vim/usr/local/apache2/conf/httpd. conf find this line, remove the # comment above (different versions may not be in this line) 460 # Includeconf/extra/httpd-vhosts.conf 2: modify the web page path of the VM configuration file in/usr/local/apache2/co

Install apache using the source code. skip this step.

I. first, enable the VM function.

[Root @ localhost ~] # Vim/usr/local/apache2/conf/httpd. conf

Locate this line and remove the # Comment (different versions may not be in this line)

460 # Include conf/extra/httpd-vhosts.conf

II. modify the VM configuration file

The webpage path is under/usr/local/apache2/conf/htdocs.

Create 2 websites

Create the root directory of the two websites

Mkdir/usr/local/apache2/htdocs/1 2

Echo "woshi 1">/usr/local/apache2/htdocs/1/index.html

Echo "woshi 2">/usr/local/apache2/htdocs/2/index.html

Modify the VM configuration file

[Root @ localhost ~] # Vim/usr/local/apache2/conf/extra/httpd-vhosts.conf


Related Article

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.