Total de visualizações de página

sábado, 23 de abril de 2016

Install httpd to configure Web Server




Install httpd to configure Web Server. HTTP uses 80/TCP.
[1]Install httpd.
[root@www ~]# 
yum -y install httpd
# remove welcome page

[root@www ~]# 
rm -f /etc/httpd/conf.d/welcome.conf
[2]Configure httpd. Replace server name to your own environment.
[root@www ~]# 
vi /etc/httpd/conf/httpd.conf
# line 86: change to admin's email address

ServerAdmin 
root@server.world
# line 95: change to your server's name

ServerName 
www.server.world:80
# line 151: change

AllowOverride 
All
# line 164: add file name that it can access only with directory's name

DirectoryIndex index.html 
index.cgi index.php
# add follows to the end

# server's response header

ServerTokens Prod
# keepalive is ON

KeepAlive On
[root@www ~]# 
systemctl start httpd 

[root@www ~]# 
systemctl enable httpd 
[3]If Firewalld is running, allow HTTP service. HTTP uses 80/TCP.
[root@dlp ~]# 
firewall-cmd --add-service=http --permanent 

success
[root@dlp ~]# 
firewall-cmd --reload 

success
[4]Create a HTML test page and access to it from client PC with web browser. It's OK if following page is shown.
[root@www ~]# 
vi /var/www/html/index.html
<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
Test Page
</div>
</body>
</html>

Nenhum comentário:

Postar um comentário