How to make an Nginx Webserver in 7 minutes

Опубликовано: 03 Январь 2021
на канале: Kian Brose
26,552
1k

In this tutorial you will learn how to make an nginx webserver in under 7 minutes! I cover the basics on what a webserver is, how it works and how to make one! You do not need expensive equipment to do this as a simple Raspberry Pi like the one I used (RPI 4B 4gb ram) will work.

The best operating system for webservers like these ones (my personal opinion) is debian. If you know a bit about raspberry pi's you'll know that the operating system I actually used is Raspberry pi OS lite, which is pretty much debian but made for raspberry pi's (You can notice this because my username is pi, if you use debian the default username should be root).

Anyways, here are the timestamps and commands I used in the video and the commands:

0:00 - Introduction
0:18 - Hardware
0:28 - Operating system
0:57 - Initial setup

sudo apt-get update
sudo apt-get upgrade

sudo apt install nginx

ip a

1:54 - Installing a database

sudo apt install mysql-server
or
sudo apt install mariadb-server

sudo mysql_secure_installation

2:47 - PHP installation
sudo add-apt-repository universe
(Add apt repository is for ubuntu users only)

sudo apt install php-fpm php-mysql

sudo nano /etc/nginx/sites-available/default

nginx -t

4:20 - Testing everything works

cd /var/www/html/
(Remember to add angled bracket before php, youtube description does not let me add it)
?php
phpinfo();

5:14 - Drag and dropping files with filezilla into the server

https://filezilla-project.org/
Try port 21 if port 22 does not work