Local (production mode) OSM server keeps logging me out after editing.

See also: https://wiki.openstreetmap.org/wiki/User:Ika-chan!/Fantasy_maps_with_OSM_software ← a record of how I installed such a server so far.

I am testing out instructions on how to build my own OpenStreetMap server in production mode for my own projects, but I currently run into a problem wherein after making an edit in the local version of iD and Potlatch, I keep getting logged out automatically and I have to log back in.

I already set the appropriate consumer keys and permissions, and iD and Potlatch itself is working fine, so where did I go wrong in terms of cookie handling? log/Production.log does not appear to report anything out of the blue.

I hope to get this solved before dealing with Nominatim and Overpass for the instructions.

The host domain/IP I plan to use is maps.minoa. The website is on /mapserver/website/www.

Apache config:

<VirtualHost *:80>
    ServerName localhost

    DocumentRoot /mapserver/website/www/public
    PassengerRuby /usr/bin/ruby2.3

    LoadTileConfigFile /usr/local/etc/renderd.conf
    ModTileRenderdSocketName /var/run/renderd/renderd.sock
    ModTileRequestTimeout 3
    ModTileMissingRequestTimeout 60

    <Directory /mapserver/website/www/public>
        Allow from all
        Options -MultiViews
        Require all granted

ScriptAlias /fcgi/ /mapserver/sources/cgimap/
<Directory "/mapserver/sources/cgimap/">
    SetHandler fcgid-script
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    FcgidWrapper /mapserver/sources/cgimap/scripts/cgimap-wrapper
    Order allow,deny
    Allow from all

Furthermore, when I register a new account, it errors out with an “Application error” after agreeing to the terms, so it might be struggling to access some files even though the production database is running smoothly.

How do I make the above a spoiler to conserve length?