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!