SLES as Apache Server

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on pinterest
Share on print
Share on email
Table of Contents

Introduction

According to the survey from http://www.netcraft.com/ , the Apache HTTP Server (Apache) is the world’s most widely-used Web server.

 

Apache is Developed by the Apache Software Foundation (http://www.apache.org/),

it is available for most operating systems. SUSE® Linux Enterprise Server includes Apache version 2.4.

In this article: learn how to install, configure and set up a Web server;

apache network diagram

apache network diagram

before moving to configure SAMBA

let us to have a look to above network diagram

SLES will be configured sa apache HTTP server 

since SLES in DMZ [servers farm] : we we have to consider network firewall [which is PFsense in our case  ]

STEP 01 : install package [apache2 ] on SLES

first of all we have to check if package  apache2 [which is responsible of running apache ] is installed or NOT 

use command : 

zypper info  apache2

if apache2 is NOT installed > then simply install it using command 

zypper install --no-confirm apache2

 

apache2 is not installed
install apache2
apache2 is installed

Step 02 configure apache2

open file /etc/sysconfig/apache2

and set the following parameters :

APACHE_SERVERADMIN="administrator@pioneers.lab"

 APACHE_SERVERNAME="networks-pioneers"

APACHE_SERVERTOKENS="Prod"

Then save and exit

open file /etc/apache2/httpd.conf

and set the following parameters :

DirectoryIndex index.html index.htm

Then save and exit

configure apache2 parameters
configure apache2 parameters
configure apache2 parameters
configure apache2 parameters

Step 03 : start services apache2

now we have to check if service apache2 is running  

use command : 

systemctl status apache2

if NOT started then > start it 

systemctl start apache2

also we have to Enable apache2 during system startup

systemctl enable apache2
 
start apache2 service

Step 04 : Enable firewall rule for http & https

create  firewall rule to enable http & https 

firewall-cmd --permanent --add-service=http --permanent
firewall-cmd --permanent --add-service=https --permanent

then reload  firewall 

firewall-cmd --reload
create rule on SLES firewall to open http , https

Step 05 : open port 80 ,443 on firewall PF-sense

to it’s time to open port 80 ,443 in network firewall

it’s depend on your network firewall , in networks pioneers : we are using network firewall PFsense

create rul on network firewall PF sense to open port 80,443

Create a HTML test page

Open file /srv/www/htdocs/index.html

And insert code

<html>

<body>

<div style=”width: 100%; font-size: 40px; font-weight: bold; text-align: center;”>

Welcome To Network Pioneers

</div>

</body>

<body>

<div style=”width: 100%; font-size: 40px; font-weight: bold; text-align: center;”>

This is First Web Page

</div>

</body>

</html>

create test page

access web site from client PC with web browser

we can access web site using url

http://172.16.100.123

or 

http://sles123

 

also we can add alias record [networks-pioneers ]for sles123 

http:networks-pioneers

 

access web site http://172.16.100.123
create alias record in DNS
acess web site
Share this post
Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on pinterest
Share on print
Share on email

About Me

Our Power in Numbers

 17 

Courses

321

Articles

3,882

Images
and All configurations images are proudly made in Pioneers Lab

Articles By Course

Recent Articles

Subscribe

Contact us

have a challenge ? don’t hesitate to contact us