Editing Setting up a server

From AAGRINDER wiki
Jump to navigationJump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
 
Currently, there are only instructions for setting up a server on Linux. Feel free to add instructions for other platforms.
 
Currently, there are only instructions for setting up a server on Linux. Feel free to add instructions for other platforms.
  
Line 40: Line 39:
  
 
Now, anyone who can [[wikipedia:port forwarding|access your computer]] via internet can easily connect to your aagrinder server.
 
Now, anyone who can [[wikipedia:port forwarding|access your computer]] via internet can easily connect to your aagrinder server.
 
== Secure connection over HTTPS ==
 
 
The AAGRINDER server by itself exposes a HTTP website. For better security, HTTPS is preferred. To achieve this, an additional software component needs to be involved as a [[wikipedia:Reverse proxy|reverse proxy]]. In this guide, we use [[wikipedia:Nginx|Nginx]].
 
 
A Nginx configuration for proxying AAGRINDER might look like this:
 
<pre>
 
server {
 
    server_name aagrinder.xyz;
 
 
    location / {
 
        proxy_pass http://localhost:8926;
 
    }
 
 
    location ~* /.io {
 
        proxy_pass http://localhost:8926;
 
        proxy_set_header X-Forwarded-For $remote_addr;
 
        proxy_set_header X-Real-IP $remote_addr;
 
        proxy_set_header X-NginX-Proxy false;
 
        proxy_set_header Host $host;
 
        proxy_redirect off;
 
        proxy_http_version 1.1;
 
        proxy_set_header Upgrade $http_upgrade;
 
        proxy_set_header Connection "upgrade";
 
    }
 
 
    listen [::]:443 ssl;
 
    listen 443 ssl;
 
    ssl_certificate /etc/letsencrypt/live/aagrinder.xyz/fullchain.pem;
 
    ssl_certificate_key /etc/letsencrypt/live/aagrinder.xyz/privkey.pem;
 
    include /etc/letsencrypt/options-ssl-nginx.conf;
 
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
 
}
 
 
server {
 
    return 302 https://$host$request_uri;
 
 
    server_name aagrinder.xyz;
 
 
    listen 80;
 
    listen [::]:80;
 
}
 
</pre>
 
 
Here, AAGRINDER is running on port 8926 and is accessible from the outside on port 443 (https) through Nginx. The HTTPS certificate, located at ''/etc/letsencrypt/live/aagrinder.xyz'' was acquired from [[wikipedia:Let's Encrypt|Let's Encrypt]] using ''certbot''. For reference, the specific command used to acquire this certificate was:
 
<pre>
 
# certbot certonly --nginx -d aagrinder.xyz
 
</pre>
 

Please note that all contributions to AAGRINDER wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see AAGRINDER wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)