From 8bcc5e70f895857281b466ff82c0a55c4cd322fb Mon Sep 17 00:00:00 2001
From: mjfernez
There are many web servers out there, but I like nginx since the configuration file is a bit easier to read than others. So let's install it.
-$ sudo apt install nginx
+$ sudo apt install nginx
On Ubuntu or Debian, nginx puts the default server configuration in the folder "/etc/nginx/sites-enabled/default". Open that in a text editor like vim or nano, and you should see something like this @@ -174,7 +238,7 @@ included as part of the web server when viewed in a web browser.
you can access your C drive at "/mnt/c". So let's say you had a folder of cat pics in "C:\Users\username\Desktop\cats"; you can copy this into your website by running: -$ cp -vr /mnt/c/Users/username/Desktop/cats /var/www/html
+$ cp -vr /mnt/c/Users/username/Desktop/cats /var/www/html
Run the server, then go to your web browser and type: "http://localhost". You'll find a directory with your files in it! And you can access them at "http://localhost/foldername/filename.extension". @@ -203,20 +267,20 @@ routers will have some kind of steps similar to this:
"ip a" (Linux). Typically it is listed first and will start with "192.168" or "10.0" but it depends on the manufacturer. Here's my output at home for example: -1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
- link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
- inet 127.0.0.1/8 scope host lo
- valid_lft forever preferred_lft forever
- inet6 ::1/128 scope host
- valid_lft forever preferred_lft forever
-2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
- link/ether 4c:cc:6a:93:eb:0b brd ff:ff:ff:ff:ff:ff
- inet 192.168.1.202/24 brd 192.168.1.255 scope global dynamic noprefixroute enp7s0
- valid_lft 74501sec preferred_lft 74501sec
- inet6 fe80::4ecc:6aff:fe93:eb0b/64 scope link noprefixroute
- valid_lft forever preferred_lft forever
-3: wlp5s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
- link/ether 82:e2:e4:c2:0c:a1 brd ff:ff:ff:ff:ff:ff permaddr 98:de:d0:f3:d6:ea
+1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
+link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
+ inet 127.0.0.1/8 scope host lo
+ valid_lft forever preferred_lft forever
+ inet6 ::1/128 scope host
+ valid_lft forever preferred_lft forever
+ 2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
+link/ether 4c:cc:6a:93:eb:0b brd ff:ff:ff:ff:ff:ff
+ inet 192.168.1.202/24 brd 192.168.1.255 scope global dynamic noprefixroute enp7s0
+ valid_lft 74501sec preferred_lft 74501sec
+ inet6 fe80::4ecc:6aff:fe93:eb0b/64 scope link noprefixroute
+ valid_lft forever preferred_lft forever
+ 3: wlp5s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
+link/ether 82:e2:e4:c2:0c:a1 brd ff:ff:ff:ff:ff:ff permaddr 98:de:d0:f3:d6:ea
The device "enp7s0" is my Ethernet adapter (starts with an 'e') and my current local ip address for the device is shown. If you use wifi, it will likely start with a "wl." Set the forwarding rule according to this @@ -363,7 +427,7 @@ subdomains on the same IP address like "git.mjfer.net".
be able access your server by name.A decade of half-though through security advice has convinced +
A decade of half-thought through security advice has convinced everyone that HTTPS and only HTTPS is secure. This is simply not true. Using HTTP alone doesn't inherently make you insecure and using HTTPS doesn't automatically guarantee the app your communicating -- cgit v1.2.3