Private Symfony on a shared PHP runtime: delivery and HTTPS
The official Symfony skeleton in an existing PHP pool: composer install, code permissions, password-protected HTTPS and checks after the second reboot.
After configuring the shared foundation, the next step is to deliver an official Symfony skeleton to an existing PHP pool. This does not require reinstalling PHP or creating another directory layout. The second pool remains separate, while the training site receives private HTTPS with password authentication.
Exact code and locked dependencies
The source is a specific Git commit of the official skeleton, including composer.lock and symfony.lock. Delivery reads the committed state. Uncommitted local changes, secret environment files and an existing vendor directory are excluded. This example uses no owner bundles or private application code.
Dependencies are installed with composer install under a separate builder account with temporary access. The following invocation matches the command used by this stage; it runs from the application directory in the prepared environment. Passwords are not passed as command arguments.
/usr/bin/php8.5 /usr/bin/composer --no-cache install \
--no-dev --prefer-dist --no-interaction --no-progress \
--optimize-autoloader
The production cache is then warmed, builder access is revoked, and code becomes root-owned. PHP write access is limited to the runtime directory. The PHP account cannot edit the entire application.
Check the active Nginx configuration
This fixture's service uses a separate main configuration. Merely placing a TLS fragment in conf.d does not mean Nginx reads it. One explicit include is required in the active main configuration, preserving the existing two PHP pools and private origin routes.
nginx -t -c /etc/nginx/deploy-cli-origin.conf
The syntax check must select the same file as the service. One reload follows the approved configuration replacement. An unknown operation result does not authorize blindly running setup again.
Password, TLS and Symfony responses are separate checks
The certificate is checked against the selected hostname and an explicitly chosen CA. This isolated VM uses a local test CA: the result does not prove Cloudflare or public DNS configuration. Checks run inside the server; public web ingress remains closed in the firewall.
To reproduce the HTTP checks independently, you can use curl. Set DEMO_HOST, DEMO_CA and DEMO_USER to your own values. The second command prompts for the password interactively.
curl --resolve "$DEMO_HOST:443:127.0.0.1" \
--cacert "$DEMO_CA" --output /dev/null --write-out '%{http_code}\n' \
"https://$DEMO_HOST/"
curl --resolve "$DEMO_HOST:443:127.0.0.1" \
--cacert "$DEMO_CA" --user "$DEMO_USER" \
--output /dev/null --write-out '%{http_code}\n' \
"https://$DEMO_HOST/"
A request without credentials should receive 401; an incorrect password should also receive 401. With valid credentials, an empty skeleton may return 404 because no homepage route exists yet. Compare that response with the application through its origin rather than treating any 404 as proof that Symfony works.
Check noindex, no-store and internal-file denials separately. Authentication restricts access; noindex instructs indexing. They serve different purposes. Site readiness on the current boot does not yet prove automatic recovery after a reboot.
Actual results and the second reboot
The VM produced the following results. This summarizes actual CLI checks; the curl commands above are examples for independent reproduction.
| Check | Response |
|---|---|
| No password | 401 |
| Incorrect password | 401 |
| Valid password | 404; Symfony origin |
| Internal files | 404; /.env, /other.php |
| Wrong Host | 421 |
| HTTP → HTTPS | 308 |
| Wrong SNI | TLS connection rejected |
After a separately controlled reboot, a new console login confirmed the same machine and a different boot. Private SSH with password-sudo, fresh PHP processes, all eight TLS/HTTP checks and authenticated Redis PING were checked again. Historical completion records, boot identities and PIDs were not replaced with current values. This proves the specific isolated fixture; the existing E01 needs its own verification.