This guide shows how to configure Art Menagerie with a web server. We will not cover how to install or configure these web servers in general, you will need to consult their individual documentation for details. You may also want to consult your operating system's documentation since web servers are often included in their package manager.
You do not need this guide if you use a web host provider that configures the web server for you.
There are many webservers to choose from. Here are just a few:
You can find more webservers on Wikipedia's page Comparison of web server software
Configurations are minimal here, look at the Beyond Art Menagerie section on the Privacy and Anti-AI Features wiki page for some guidance on protecting your website.
Consider adding configuration from ai.robots.txt to block AI/scrapers that do not obey /robots.txt!
Caddy Webserver
Caddy is a web server that makes it relatively easy to setup a website with HTTPS (which is HTTP secured with TLS).
Configuration is usually with a Caddyfile.
Caddyfile for Static Website
Basic configuration for hosting https://argentarius.art as an example:
argentarius.art {
encode zstd gzip
root * /srv/www/argentarius.art/www
file_server
header {
Strict-Transport-Security max-age=31536000; # enable HSTS
}
handle_errors 404 {
rewrite /{err.status_code}.html
file_server
}
handle_errors {
respond "{err.status_code} {err.status_text}"
}
}
What it does:
argentarius.art {defines the website. Replace this with your own hostname.- encode enables compression. This can greatly reduce the transfer size and improve the performance of your website.
- root sets the directory path of the website files. Replace this with the directory of your website on your server.
- file_server tells Caddy to serve files from the
rootsetting. - Strict-Transport-Security is added to the header to enable strict HTTPS security mode on clients. This essentially tells web browsers that this website should only be connected to with HTTPS. This is best practice for securing your website. This setting is optional, but recommended.
- handle_errors is used to serve the themed
/404.htmlpage when there is a404 Not Founderror. Other errors are displayed to the user as plain text. These settings are optional, but recommended.