Marlon's Wiki

it's better when it's simpler

User Tools

Site Tools


start:software:nginx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
start:software:nginx [2024/08/26 23:24] marlonivostart:software:nginx [2024/12/01 09:13] (current) marlonivo
Line 1: Line 1:
-===== Setting Up an NginX Web-and Mailserver ===== +=====NginX Web-and Mailserver ======
- +
-**Important:** +
- +
-Exchange yourdomain.xyz with your actual domain! +
- +
-Exchange yoursite with the actual name of your site!+
  
 **Preparations:** **Preparations:**
  
-   - Search for a cheap Website Hoster (i use Hetzner, alternatives are Linode and Vultr)+   - Search for a cheap Website-Host (i use Hetzner, alternatives are Linode and Vultr)
    - Create an Account     - Create an Account 
    - Get the cheapest cloud server which runs Debian on it (you can upgrade the Power and Storage later when your Website has actual traffic)    - Get the cheapest cloud server which runs Debian on it (you can upgrade the Power and Storage later when your Website has actual traffic)
 +
 +----
  
 **Domain:**  **Domain:** 
-   - Choose any DNR you want (i use njalla, because no personal data is required there+   - Choose any DNR you want (i use njalla, because no personal data is required) 
-   - Create an Account and buy your wished Domain (.xyz endings are pretty cheap, can recommend+   - Create an Account and buy your wished Domain (.xyz endings are pretty cheap) 
-   - Edit the DNS Records so that they point to your Server:+   - Edit the DNS Records so that they point to your Server
  
 > DNS resolution involves converting a host name, e.g. www.example.com, into a computer-friendly IP address, e.g. 192.168.1.1. > DNS resolution involves converting a host name, e.g. www.example.com, into a computer-friendly IP address, e.g. 192.168.1.1.
Line 33: Line 29:
 ---- ----
  
-==== Logging into the Server ====+===== Logging into Server =====
  
 We first want to log into our Server. Therefore pull up a terminal and type (*Note you can also replace the yourdomain.xyz with the IP address of your server): We first want to log into our Server. Therefore pull up a terminal and type (*Note you can also replace the yourdomain.xyz with the IP address of your server):
Line 42: Line 38:
  
  
-==== Installing the Webserver Nginx ====+===== Installing Nginx =====
    
  
Line 60: Line 56:
 Nginx is your webserver. You can make a little website or page, put it on your VPS and then tell nginx where it is and how to host it on the internet. It's simple. Let's do it. Nginx is your webserver. You can make a little website or page, put it on your VPS and then tell nginx where it is and how to host it on the internet. It's simple. Let's do it.
  
-Info: +Nginx configuration files are in /etc/nginx/. The two main subdirectories in there (on Debian and similar OSes) are /etc/nginx/sites-available and /etc/nginx/sites-enabled. The names are descriptive. The idea is that you can make a site configuration file in sites-available and when it's all ready, you make a link/shortcut to it in sites-enabled which will activate it.
-Nginx configuration files are in /etc/nginx/. The two main subdirectories in there (on Debian and similar OSes) are /etc/nginx/sites-available and /etc/nginx/sites-enabled. The names are descriptive. The idea is that you can make a site configuration file in sites-available and when it's all ready, you make a link/shortcut to it in sites-enabled which will activate it.+
  
 Create a file in /etc/nginx/sites-available by doing this: Create a file in /etc/nginx/sites-available by doing this:
Line 160: Line 155:
 cerbot --nginx cerbot --nginx
 </code> </code>
- 
- 
-{{:start:system:system:this_is_why_we_need_python-certbot-nginx_2.png?800|}} 
  
  
Line 174: Line 166:
  
 Now we are finished, the website should update automatically immeadietly after you synced your files via rsync (no need to restart the server).  Now we are finished, the website should update automatically immeadietly after you synced your files via rsync (no need to restart the server). 
 +
 +----
  
 ==== Contribution ==== ==== Contribution ====
   * [[https://lukesmith.xyz|Luke Smith]]   * [[https://lukesmith.xyz|Luke Smith]]
start/software/nginx.1724714665.txt.gz · Last modified: 2024/08/26 23:24 by marlonivo

Donate Marlon Ivo's Webpage