Get the App
SLTechnology News&Howtos  ›  Development  › 

How to configure virtual host in apache

Shulou Source: shulou.com Published: 2022-06-03 07:45:03 11月15日 Update

This article mainly shows you "how to configure virtual hosts in apache". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to configure virtual hosts in apache".

Open the configuration of vhost in the 1.apache configuration file

LoadModule vhost_alias_module modules/mod_vhost_alias.so

Include conf/extra/httpd-vhosts.conf

Httpd-vhosts.conf in the 2.extra directory

Inside the configuration, there are three: the first DocumentRoot, the absolute directory of the project, ending with /; the second is ServerPath, which is the same as DocumentRoot; and the third is ServerName, which is the domain name entered in the browser. Such as: test.123.cn

3. Point to the domain name in the hosts file. For example, 127.0.0.1 test.123.cn

These are all the contents of the article "how to configure virtual hosts in apache". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Configuration host virtual host content article three domain name file directory learning help consistent pointing easy to understand more organization browser knowledge tape industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Redmi NVidia Huawei OPPO Reno