summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormjfernez <mjf@mjfer.net>2021-10-29 19:31:09 -0400
committermjfernez <mjf@mjfer.net>2021-10-29 19:31:09 -0400
commit0f800a5eaf9be3c26ac0614593e605a57dcdaf5e (patch)
tree19338f8fa37dc0b246f7bf68835bdcb108a120ce
parent97923657b206bfe8755590c6e4df3c06da521420 (diff)
downloadsite-files-0f800a5eaf9be3c26ac0614593e605a57dcdaf5e.tar.gz
Fix code tags
-rw-r--r--tutorials/how-to-host-a-tor-hidden-service.html6
-rw-r--r--tutorials/how-to-make-this-site.html8
2 files changed, 7 insertions, 7 deletions
diff --git a/tutorials/how-to-host-a-tor-hidden-service.html b/tutorials/how-to-host-a-tor-hidden-service.html
index cfba522..aebc21c 100644
--- a/tutorials/how-to-host-a-tor-hidden-service.html
+++ b/tutorials/how-to-host-a-tor-hidden-service.html
@@ -11,7 +11,7 @@
<p>You may need to enable the service first. I think this is done by default now, but it doesn't hurt:</p>
<pre><code>$ sudo systemctl enable tor.service</code></pre>
<h3 id="configure-tor">Configure Tor</h3>
-<p>You'll need to edit the file <code>/etc/tor/torrc</code> before your service can be available over Tor. Use vim, nano, or whatever you like to edit the file (as root!) and search for the following lines:</p>
+<p>You'll need to edit the file "/etc/tor/torrc" before your service can be available over Tor. Use vim, nano, or whatever you like to edit the file (as root!) and search for the following lines:</p>
<pre><code>#HiddenServiceDir /var/lib/tor/hidden_service/
#HiddenServicePort 80 127.0.0.1:80</code></pre>
<p>Remove the '#' at the beginning oh each and change the port to 8000 like so:</p>
@@ -29,6 +29,6 @@ HiddenServicePort 80 127.0.0.1:8000</code></pre>
<p>Change into the directory and run Python's built-in http server:</p>
<pre><code>$ cd files
$ python3 -m http.server</code></pre>
-<p>You'll see the server is being hosted on port 8000, which is what we chose in the config file earlier. Just leave it running, or send it to the background with Ctrl+Z and run <code>bg</code>.</p>
-<p>And that's it! You are now the proud owner of a tor hidden service. Take the hostname you copied down before and add <code>.onion</code> to the end and give it to your friends so they can browse the files in the directory through the Tor Browser.</p>
+<p>You'll see the server is being hosted on port 8000, which is what we chose in the config file earlier. Just leave it running, or send it to the background with Ctrl+Z and run "bg".</p>
+<p>And that's it! You are now the proud owner of a tor hidden service. Take the hostname you copied down before and add ".onion" to the end and give it to your friends so they can browse the files in the directory through the Tor Browser.</p>
<p>Be sure to watch the program log though... lest they get up to no good.</p>
diff --git a/tutorials/how-to-make-this-site.html b/tutorials/how-to-make-this-site.html
index 5366907..ccfa955 100644
--- a/tutorials/how-to-make-this-site.html
+++ b/tutorials/how-to-make-this-site.html
@@ -16,7 +16,7 @@
<p>Because of that, I think it's important to understand that "running your own website" is not just a <em>technical</em> ordeal, but also an <em>economic</em> one since you have to carefully think about what it means to you to <em>own</em> your server, your software, and your hardware. That doesn't mean it's hard to do, just that there's options.</p>
<p><a id="thepoint"></a> ## What is a web server and how do I run one? <em>TL;DR a web server is just a program that lets other computers on a network view files in a chosen folder. All you need to do is download a web server: apache and nginx are popular ones, but you can easily program your own with web frameworks like <a href="https://flask.palletsprojects.com/en/2.0.x/">Flask</a> or <a href="https://facil.io/">Facil</a></em></p>
<p>You can run a web server for free right now. If you're on windows go download Apache for Windows <a href="https://httpd.apache.org/docs/current/platform/windows.html">here</a> and follow the set up guide <a href="https://www.liquidweb.com/kb/how-to-install-apache-on-a-windows-server/">here</a>. If you're on Linux, you probably already have it installed.</p>
-<p>Find the configuration file in <code>sites-available/default</code> (on windows, this may be led by C:FilesSoftware Foundation&#xA0;). You'll see something like the following:</p>
+<p>Find the configuration file in "sites-available/default" (on windows, this may be led by C:FilesSoftware Foundation&#xA0;). You'll see something like the following:</p>
<pre><code>&lt;VirtualHost *:80&gt;
ServerAdmin webmaster@localhost
@@ -32,7 +32,7 @@
allow from all
&lt;/Directory&gt;</code></pre>
<p>For now, you don't need to change anything, so don't worry about what it means.</p>
-<p>But do note the directory set on "DocumentRoot," which may differ for you. This is where the web server looks for files and folders. So let's put some stuff there! Put whatever, a picture, a text file. Run the server, then go to your web browser and type: <code>http://localhost</code>. You'll find a directory with your files in it! And you can access them at <code>http://localhost/filename.extension</code></p>
+<p>But do note the directory set on "DocumentRoot," which may differ for you. This is where the web server looks for files and folders. So let's put some stuff there! Put whatever, a picture, a text file. 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/filename.extension"</p>
<p>The problem is, only you and others on your home network can visit your site right now.</p>
<p>Your computer's most likely behind your router's firewall, which will not allow any traffic in. You'll need to forward a port from your router (port 80 is for HTTP) to point to the device hosting the server.</p>
<p>Router's differ when it comes to to exact configuration, but MOST routers will have some kind of steps similar to this:</p>
@@ -46,7 +46,7 @@
<li>forward to address/device: your device's local ip</li>
<li>forward to/destination port: 80</li>
</ul>
-<p>You can get your device's local ip by typing <code>ipconfig</code> (Windows) or <code>ip a</code> (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:</p>
+<p>You can get your device's local ip by typing "ipconfig" (Windows) or "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:</p>
<pre><code>1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; 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
@@ -120,7 +120,7 @@
<p>A decade of half-though through security advice has convinced everyone that HTTPS and <em>only</em> 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 with is secure.</p>
<p>What HTTPS means is that the <em>data you send to the server</em> is encrypted. This only provides security in contexts where you're entering information like a credit card number or a password. In those cases <em>you need HTTPS</em>. But if you're just requesting a text document, or a cat picture, and not sending any data, HTTP is perfectly acceptable for retrieving that information.</p>
<p>Web browsers have largely responded to this fact by assuming that HTTP is always insecure and printing a warning when you visit a site without HTTPS enabled. Unfortunately, most users interpret this to mean the site is somehow dangerous, even if it doesn't collect any information about the user. Because of that, most you will want to go the extra mile to make your visitors feel warm and fuzzy inside and implement HTTPS.</p>
-<p>Fortunately, this is now much easier than is used to be thanks to <a href="https://letsencrypt.org/">LetsEncrypt</a>. LetsEncrypt generously serves as a free certificate authority, which allows you to generate signed certificates that are recognized by every web browser in the world. The tool they recommend, <a href="https://certbot.eff.org/">certbot</a> is painless to install. I've rarely had to do much more than <code>certbot certonly</code> and follow the prompts to get a certificate. Once you've obtained one, add it to <a href="https://httpd.apache.org/docs/2.4/ssl/ssl_howto.html">apache</a> or <a href="https://www.nginx.com/blog/nginx-ssl/#Examples">nginx</a>, switch the port to 443 instead of 80 and bam, you've got HTTPS!</p>
+<p>Fortunately, this is now much easier than is used to be thanks to <a href="https://letsencrypt.org/">LetsEncrypt</a>. LetsEncrypt generously serves as a free certificate authority, which allows you to generate signed certificates that are recognized by every web browser in the world. The tool they recommend, <a href="https://certbot.eff.org/">certbot</a> is painless to install. I've rarely had to do much more than "certbot certonly" and follow the prompts to get a certificate. Once you've obtained one, add it to <a href="https://httpd.apache.org/docs/2.4/ssl/ssl_howto.html">apache</a> or <a href="https://www.nginx.com/blog/nginx-ssl/#Examples">nginx</a>, switch the port to 443 instead of 80 and bam, you've got HTTPS!</p>
<h2 id="references">References</h2>
<ol type="1">
<li>https://dataswamp.org/~solene/2021-07-23-why-selfhosting-is-important.html</li>