Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Building a virtual host with linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Concept

Virtual web host

Multiple web sites are running on the same physical server, each of which does not occupy a real computer independently.

Three types of virtual hosts supported by httpd

Virtual host based on domain name

Virtual host based on IP address

Port-based virtual host

Construction of virtual host based on domain name

Install dns and http services

Change dns profile

Add the dns server address 192.168.149.129 on the test machine

Enable the service, turn off the firewall, and test whether the resolution is successful.

Add a subprofile directory extra to the configuration file of the httpd service, and add the virtual host configuration file within the directory

Create a site

Declare the main profile to the subprofile

Start the service to access the virtual web

* * Virtual hosts based on different ports

Change the configuration file of the virtual host

Create a website

Change listening port in configuration file

Start the service, test

Virtual host based on different IP

Add a network card to get the address automatically

Change the virtual host profile

Create a directory site

Change the listening address

Restart the service, testing

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report