# AI Cats — Apache vhost.
#
# Serves the app at http://<host>:8888/ — landing on the Predictions queue,
# matching the URL contract the in-app router expects (/login, /predictions,
# /admin/health, /api/..., etc. — no /ai_cats prefix).
#
# Install:
#   sudo cp scripts/apache-vhost-ai-cats.conf /etc/apache2/sites-available/ai-cats.conf
#   sudo a2enmod rewrite
#   sudo a2ensite ai-cats
#   sudo apachectl configtest
#   sudo systemctl reload apache2
#
# If the host has a firewall that doesn't already allow 8888:
#   sudo ufw allow 8888/tcp     # ufw (Ubuntu default)
#   # — or —
#   sudo firewall-cmd --add-port=8888/tcp --permanent && sudo firewall-cmd --reload   # firewalld
#
# After reload, browse to http://<your-host>:8888/ — you'll be redirected to
# /login if not signed in, then land on the Predictions queue.
#
# Adjust the `<Directory>` user/group if PHP-FPM runs as something other than
# www-data on this host.

Listen 8888

<VirtualHost *:8888>
    ServerName ai-cats
    DocumentRoot /var/www/html/ai_cats/public

    <Directory /var/www/html/ai_cats/public>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/ai_cats-error.log
    CustomLog ${APACHE_LOG_DIR}/ai_cats-access.log combined
</VirtualHost>
