1. First, we configure the server IP address
2. Create a site data directory, respectively,
Creating each port 6111,6222 site data directory:
mkdir -p /home/wwwroot/6111
mkdir -p /home/wwwroot/6222
Are written in different content website data directory home page file:
echo "port:6111" > /home/wwwroot/6111/index.html
echo "port:6222" > /home/wwwroot/6222/index.html
3. Describe the virtual host port number in the configuration file, the configuration to
In the Listen 80 about line 42, and the following was added Listen 6111 Listen6222
Follows at the end of the configuration file
4, restart, systemctl restart httpd
But I found wrong, what is asked na! This is because SELinux service detects that port 6111 and 6222 are not part of the original Apache service port, but now they are in the name of the Apache listener.
5. Next we add ports
View SELlinux system associated port number: semanage port -l | grep http
Add the following statement by
semanage port -a -t http_port_t -p tcp 6111
semanage port -a -t http_port_t -p tcp 6222
Then view the port, with the result, and then restart
6. Then open the browser to view it
Good finish successfully live!