Set up personal web pages of VM users under LAMP

Source: Internet
Author: User

LAMPUnder the web page of the VM userErectionThe process is as follows:

Experimental environment: Linux 5.3 + LAMP has been set up.

Before setting up the personal web page of the VM, LAMP has been set up.

1. First edit vi/etc/extra/httpd-vhosts.conf File

Change the line NameVirtualHost *: 80 to NameVirtualHost 192.168.2.128: 80, where 192.168.2.128 is the IP address of my APACHE server.

Add the following VM:

ServerName www.sina.com here we set up a virtual personal webpage: www.sina.com

DocumentRoot/usr/local/apache2/htdocs/sina this path is the document root directory of the APPACHE server.

2. Create a virtual webpage directory/usr/local/apache2/htdocs/sina which is created under the default APPACHE document root directory.

Touch index.html

Edit vi index/html

Hello, this is my blog! This is the added text content.

The above virtual web page Directory is only under the default APPACHE document root directory

If it is not in the root directory, you must configure/etc/httpd. conf.

The specific configuration is as follows:

Here/home/aaa is the directory where the user places the webpage

Options Indexes FollowSymLinks

AllowOverride None

Order allow, deny

Allow from all

3. Modify the/etc/httpd. conf configuration file.

Find # virtual hosts

Remove the # above the line below, which means to enable the VM configuration.

4. Restart the APPACHE service.

/Usr/local/apache2/bin/apachectl restart

5. log on to another machine using the IP address of the APACHE server, and you will be able to see the content we just edited in the index.

* If someone asks me why I don't need to log in with a domain name, the reason is simple. No DNS service is available on my LAMP server.

Through the description in this article, we have learned the specific process of setting up the personal web page of the VM user under LAMP. I hope you can set up and use it!

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.