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.

A protected application inside a server alcove, separate runtime blocks and a lock in front of a browser window.
A protected application inside a server alcove, separate runtime blocks and a lock in front of a browser window.

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.

CheckResponse
No password401
Incorrect password401
Valid password404; Symfony origin
Internal files404; /.env, /other.php
Wrong Host421
HTTP → HTTPS308
Wrong SNITLS 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.

Summary of actual Symfony delivery, private HTTPS and checks after the second VM reboot
Genuine VTE with saved VM results: application and HTTPS, a changed boot, eight local TLS/HTTP checks, independent private SSH and Redis. Historical controls are preserved. This uses a local fixture CA; setup did not rerun during capture.
  1. Platform Engineering First Symfony site on a prepared stack: Composer and file permissions
  2. Operations & Security HTTPS and a password for E-01: Nginx, Origin CA and Symfony
  3. Platform Engineering From first root login to a private server foundation
  4. Platform Engineering Server reboot: checking access and service startup
  5. Platform Engineering Interactive server setup through the CLI

A project by the author · Weather Solution200

After reading, a look outside.

Temperature, rain and wind in your city. Check the forecast and plan the hours ahead.

Check the forecast
Next article