My plans for RPi:
1) install Apache and learn how to use a web server
2) Install a game server (any recomendations for a low performance game to test this with?)
3) Try some no-public IP service.
4) Setup the web server in such a way to allow control of the RPi.

Any other recomendations on what should I do with this junk?

Follow

@LukeAlmighty Use nginx instead, it's 500x better and easier to use

Compare:

<VirtualHost *:80>
ServerName example.com
ServerAdmin admin@example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

server {
listen 80;
server_name example.com;
root /srv/http/;
location / {
try_files $uri $uri/;
}
}

· · Web · 2 · 0 · 2
@applejack @LukeAlmighty To be fair, apache can inherit from global too, so the logging stuff is dishonest.
... In fact virtually everything in that is dishonest.

I do, however, recommend nginx. The syntax *is* nicer.

@Zerglingman @LukeAlmighty You can cut out the two logging one's I guess. I haven't used apache for years and grabbed an example from online and an example from my nginx configs. I mainly just meant it as an example of the syntax

@applejack @LukeAlmighty Yeah but if you want to demonstrate it properly you should have them do the same amount of work; preferably the exact same work. Like on nginx side set "server_name example.com www.example.com" to show off that serveralias isn't a thing.

Also today's discovery: apache's listen directives can go in global space, so although you have to *:80 for every block (and *:443 for every ssl block - I wonder if you can combine them), you don't have to do ip6 separately every time, unlike nginx:
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
(Which does only allow it in server block, sad.)
@applejack @LukeAlmighty @LukeAlmighty or use https://caddyserver.com/docs/getting-started, compare with
domain.com {
reverse_proxy 127.0.0.1:9000
}
or
domain.com {
root * /srv/http/
file_server
}

and remember caddy does ssl handling for you, with the same performance as nginx

@pleb @LukeAlmighty I dislike the cli/json/caddyfile spread, otherwise seems fine

@applejack @pleb @Zerglingman
I have reached a web server on RPi from my phone. Enough for today, but is is a progress.

Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.