Install HTTPD
# yum install httpd -y
Remove welcome page
# rm -rf /etc/httpd/conf.d/welcome.conf
Configure
# vim /etc/httpd/conf/httpd.conf
# line 86 change admin's email address
ServerAdmin root@example.com
# line 95 change to your server's name
ServerName www.example.com:80
# line 151 change
AllowOverride All
# line 164, add some file name
DirectoryIndex index.html index.php index.cgi index.htm
# keepalive is On
KeepAlive On
# Start | Restart server
# service httpd restart
# systemctl enable httpd
Create test page
# vim /var/www/html/index.html
<h1> This is a test page </h1>
Open web browser, type your IP or www.example.com
centos linux

0 comments:
Post a Comment