当前位置:网站首页>Customize the web service configuration file

Customize the web service configuration file

2022-07-07 12:25:00 Miracle_ ze

1. System mounting and installation web service

Before mounting, you should write down the warehouse
Mount command :

mount /dev/sr0 /mnt

install web service 【 Use httpd】

dnf install httpd -y

-y: Default OK , In the installation, there is no need to enter y

2. establish web Directory files and added content of web pages

1. Create directory file

mkdir /www/130 -p

130: File name , whatever
-p: Create with parent directory

2. Add content

echo haha > /www/130/index.html

3. Edit profile content

Go to configuration file :

vim /etc/httpd/conf.d/host.conf

Add content 【 Add modules 】:

<directory /www>
allowoverride
require all granted
</directory>
<virtualhost 192.168.226.130:80>
documentroot /www/130
servername 192.168.226.131
</virtualhost>

 Insert picture description here

4. restart httpd service 、 close linux Permissions and access firewall

1. restart httpd service

 systemctl restart httpd

restart And start Different :restart Is to retrieve information ,start Is to start the service to obtain file information

2. close Linux jurisdiction

setenforce 0

effect : Delete /www/130 Of documents Linux jurisdiction

3. Turn off firewall

 systemctl stop firewalld

effect : in order to Windows Able to access the configured website web Content

原网站

版权声明
本文为[Miracle_ ze]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130618062565.html