Ubuntu Linux http and https configuration

NS IT Automation


Ubuntu Linux HTTP and HTTPs configuration

  1. Purpose of document
  2. Install apt-mirror in Ubuntu
  3. Install Web Service and configuring on Ubuntu Linux (Port 80)
  4. Configure SSL (Port 443)
  5. End of Document

Ubuntu Linux HTTP and HTTPs configuration

1 Purpose of document

Purpose of this document is to explain how to configure web service on Ubuntu Linux using applications (apache2 and ssl).  

HTTP and HTTPS configuration can be done in Linux by several methods. httpd daemon is the part of one of the below packages.

2 Install apt-mirror in Ubuntu

A small tool that provides ability to mirror any parts (or even all) of Debian and Ubuntu GNU/Linux distributions or any other apt sources which typically provided by open source developers.

# apt install –y apt-mirror

3 Install Web Service on Ubuntu Linux (Port 80)

3.1. Install httpd (apache2) package

# apt install apache2

3.2. Check installed service status

# service –status-all

3.3 Stop HTTPD service

# service apache2 stop

3.4. Start HTTPD service

# service apache2 start

3.5. To auto start http (Port 80) at next reboot

# systemctl enable apacha2 .service

3.6. How to check httpd service running

# service apache2 status

3.7. Enable http in Ubuntu Linux Firewall

# ufw allow ssh

3.8. Check opened ports in Ubuntu Linux

# nmap –sT -O Local

3.9. Testing http (port 80) connection

telnet ipaddress  port

#telnet 80

4 Configure SSL (Port 443)

4.1. SSL configuration

# a2enmod ssl

Enable site default SSL

# a2ensite default-ssl

4.2. Enable https in Ubuntu Linux Firewall

# ufw allow https

4.3. Check opened ports in Linux (https)

# nmap –ST -O localhost

4.4 Testing https (port 443) connection

telnet ipaddress  port

#telnet 443

5         End of Document

Facebook Comments

2 thoughts to “Ubuntu Linux http and https configuration”

Leave a Reply

Your email address will not be published. Required fields are marked *