Homebrewserver.club website https://homebrewserver.club/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
3.2 KiB

Title: Getting Started: Installing webserver software and publishing your website
Date: 2019-01-14
Category: fundamentals
Tags: server, router, introduction, lan, wan
Slug: fundamentals-webserver-website
Description: How to set up a spare computer as a web server and publish your website.
Author: hbsc & friends
Status: draft
# SUPER UNDER CONSTRUCTION
##Introduction
Ever wanted to host your own website from the comfort of your own house? Ever wondered how to achieve this? Search no further! This guide will help you with the installation of web server software, which is what allows a computer to start handling HTTP requests and serve web content in response.
Besides helping you with the installation, this guide will help you getting the right certificates, configuring your server and publishing your homebrewserved website.
The instructions on this guide were run on a Debian Stretch distribution.
##Requirements
- A spare computer.
- A basic understanding of the command line.
- An [ssh server and client](ssh.html) installed
- Have an available power socket next to your router.
- An ethernet cable to connect your server to the router.
## Installing Apache
The Apache HTTP server is a free and open-source web server software and it has been around since 1995, being the most widely used server software in the world. Because of this, documentation is plentiful and the support community is very large, meaning that help is quite easy to get for any of your server issues.
For this reason, Apache has been selected for this guide.
There are, of course, other web server software available, the most popular of which being Nginx. Nginx, which is also free and open-source software, arrived on the scene circa 2004, and it has also become a favourite for its resource efficiency.
If you want to geek out further about the differences between Apache and Nginx, [this article](https://www.digitalocean.com/community/tutorials/apache-vs-nginx-practical-considerations) gives you an overview.
So, without further ado, open a terminal window and let's get started:
First, make sure you have the newest package versions by updating your package lists and then upgrading these packages:
```bash
$ sudo apt update && upgrade
```
Then, install the Apache HTTP server software:
```bash
$ sudo apt install apache2
```
If all went well, Apache should have been started immediately after installation. To double check this, run:
```bash
$ sudo systemctl status apache2
```
Example output:
```bash
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset:
Active: active (running) since Sat 2019-06-22 21:29:51 UTC; 6s ago
Main PID: 18398 (apache2)
CPU: 573ms
CGroup: /system.slice/apache2.service
├─18398 /usr/sbin/apache2 -k start
├─18402 /usr/sbin/apache2 -k start
├─18403 /usr/sbin/apache2 -k start
├─18404 /usr/sbin/apache2 -k start
├─18405 /usr/sbin/apache2 -k start
└─18406 /usr/sbin/apache2 -k start
Jun 22 21:29:50 supermuch systemd[1]: Starting The Apache HTTP Server...
Jun 22 21:29:51 supermuch systemd[1]: Started The Apache HTTP Server.
```
## HTTPS
## Configuration Time
## index.html