Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

74
NETWORK ADMINISTRATION WebServer 2013-2015 PASSERELLES NUMERIQEUS CAMBODIA Street 371 Phum Tropeang Chhuk (Borey Sorla), Sangkat Tek Thia Khan Sek Sok P.O. Box 511 Phnom Penh, Cambodia

Transcript of Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

Page 1: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

NETWORK ADMINISTRATION WebServer

2013-2015

PASSERELLES NUMERIQEUS CAMBODIA

Street 371 Phum Tropeang Chhuk (Borey Sorla), Sangkat Tek Thia Khan Sek Sok P.O. Box 511 Phnom Penh, Cambodia

Page 2: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 1

CONTENTS

lAB INstruCtion....................................................................................................................................................... 2

Windows ................................................................................................................................................................. 2

1. Install DNS Server ............................................................................................................................................ 3

2. Install Apaches Service..................................................................................................................................... 7

3. Testing Apache by using ................................................................................................................................ 10

http://localhost ................................................................................................................................................. 10

http://IP_server ................................................................................................................................................. 10

4. Hosting muliple websites with sub-directory ................................................................................................. 11

5. Hosting Multiple websites by: ........................................................................................................................ 13

A. Create Virtual IP............................................................................................................................................. 13

B. Create CNAME(Aliase) ................................................................................................................................... 20

6. Limit access to Webserver ............................................................................................................................. 23

I. Limit access by IP address ......................................................................................................................... 23

A. Order Allow,deny ................................................................................................................................. 23

B. Order Deny,allow ................................................................................................................................. 25

II. Authentication (username&Password) ..................................................................................................... 27

A. Create Usersname & password by command line & Shell script................................................................ 27

B. Specific user name.................................................................................................................................... 28

C. Multiple users........................................................................................................................................... 30

D. Group ....................................................................................................................................................... 33

9. Hosting PHP website with system (GLPI,Wordpress,Joomla) .............................................................................. 35

A. Create Database for each system ............................................................................................................. 35

B. Use CNAME for virtual host ...................................................................................................................... 36

9. Configure SSL for secure connection all PHP website. ........................................................................................ 63

A. Configure Redirect from port 443 to port 80, except GLPI. ............................................................................ 63

Page 3: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 2

LAB INSTRUCTION

WINDOWS

WEB Server

Network Address: 192.168.1.0/24

192.168.1.1 Router/Default Gateway

192.168.1.1 DNS Server

Page 4: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 3

1. Install DNS Server

Install bind packet

Page 5: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 4

Page 6: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 5

Configure DNS Forward lookup Zone and Reverse lookup zone

-Configure Forward Zone

Page 7: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 6

-Configure Reverse zone

Page 8: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 7

2. Install Apaches Service

Page 9: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 8

Page 10: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 9

Page 11: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 10

3. Testing Apache by using

HTTP://LOCALHOST

HTTP://IP_SERVER

Page 12: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 11

4. Hosting muliple websites with sub-directory

Page 13: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 12

Page 14: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 13

5. Hosting Multiple websites by:

A. CREATE VIRTUAL IP

- testing

Page 15: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 14

Page 16: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 15

Page 17: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 16

Page 18: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 17

Page 19: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 18

Page 20: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 19

Page 21: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 20

B. CREATE CNAME(ALIASE)

Page 22: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 21

Page 23: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 22

Page 24: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 23

6. Limit access to Webserver

I. Limit access by IP address

A. Order Allow,deny

Page 25: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 24

Page 26: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 25

B. Order Deny,allow

Page 27: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 26

Page 28: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 27

II. Authentication (username&Password)

A. Create Usersname & password by command line & Shell script.

Page 29: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 28

B. Specific user name

Page 30: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 29

Page 31: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 30

C. Multiple users

Page 32: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 31

Page 33: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 32

Page 34: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 33

D. Group

Page 35: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 34

Page 36: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 35

9. HOSTING PHP WEBSITE WITH SYSTEM

(GLPI,WORDPRESS,JOOMLA)

A. Create Database for each system

Page 37: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 36

B. Use CNAME for virtual host

Page 38: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 37

Page 39: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 38

Configure GLPI(helpdesk) file

Page 40: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 39

Page 41: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 40

Page 42: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 41

Configure Joomla File

Page 43: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 42

Page 44: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 43

Configure Wordpress File.

Page 45: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 44

Page 46: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 45

Page 47: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 46

Test Configure GLPI

Page 48: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 47

Page 49: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 48

Page 50: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 49

Page 51: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 50

Page 52: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 51

Test Configure Wordpress

Page 53: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 52

Page 54: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 53

Page 55: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 54

Page 56: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 55

Page 57: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 56

Page 58: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 57

Test Configure Joomla

Page 59: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 58

Page 60: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 59

Page 61: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 60

Page 62: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 61

Page 63: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 62

Page 64: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 63

9. CONFIGURE SSL FOR SECURE CONNECTION ALL PHP WEBSITE.

A. CONFIGURE REDIRECT FROM PORT 443 TO PORT 80,

EXCEPT GLPI.

Page 65: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 64

Page 66: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 65

Page 67: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 66

=> Configure Joomla file with SSL

Page 68: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 67

=> Configure wordpress file with SSL KEY

Page 69: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 68

Enable port

Page 70: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 69

The browser conform certificate from webserver

Test wordpress

Page 71: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 70

Page 72: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 71

Test joomla

Page 73: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 72

Page 74: Configure Webserver & SSL secure & redirect in SuSE Linux Enterprise

PASSERELLESNUMERIQUES CAMBODIA NETWORK ADMINISTRATION

TOLA.LENG-PC 73

The End!