将apache服务的端口号修改为8080,主页选取为abc1.html
[root@server1 ~
]
dir
=/var/www/html
test
=web
config
="/etc/httpd/conf/httpd.conf"
cd $dir
if [ ! -e abc1.html
] ;then echo $test > abc1.html
fi
sed -i -e
's/Listen 80/Listen 8080/g' $config
sed -i -e
's/DirectoryIndex index.html/DirectoryIndex fuyang1.html/g' $config
systemctl start httpd
netstat -anpt
| grep httpd
[root@server1 ~
]
[root@server1 ~
]
tcp6 0 0 :::8080 :::* LISTEN 56876/httpd
转载请注明原文地址:https://blackberry.8miu.com/read-2801.html