Files
hotel/docker/nginx-qloapps.conf
DanielS 1e9daa8858 Add Windows test-server setup behind nginx
- docker-compose.server.yml: app on APP_BIND for an existing nginx proxy,
  QLO_SSL passed to the container
- docker/setup-testserver.ps1: one-shot setup for Docker Desktop/WSL
  (random .env secrets, CLI install that never reinstalls over an
  existing shop, German texts, optional demo content, hardening)
- docker/harden-test-server.php: delete demo customer pub@qloapps.com,
  disable webservice API keys, set SSL mode, deny module log folders
- docker/nginx-qloapps.conf: HTTPS + basic auth + X-Forwarded-Proto
- apache: deny /modules/*/logs/ (qlocmconnector logs API secrets)
- docker/TESTSERVER.md: Windows Server guide (German)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 00:45:15 +01:00

38 lines
1.5 KiB
Plaintext

# nginx server block for the QloApps test server (HTTPS + password for the whole site).
# Replace test.example.de, the certificate paths and APP_HOST:8080 (the Windows server running Docker).
# Password file: htpasswd -c /etc/nginx/.htpasswd-hotel <user>
# (or: printf "user:$(openssl passwd -apr1)\n" > /etc/nginx/.htpasswd-hotel)
server {
listen 80;
server_name test.example.de;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
http2 on;
server_name test.example.de;
ssl_certificate /etc/letsencrypt/live/test.example.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/test.example.de/privkey.pem;
# whole site (shop + /admin-dev) behind a password while testing
auth_basic "Hotel Test";
auth_basic_user_file /etc/nginx/.htpasswd-hotel;
client_max_body_size 20m; # image uploads in the back office
add_header X-Robots-Tag "noindex, nofollow" always;
add_header X-Content-Type-Options nosniff always;
add_header Referrer-Policy strict-origin-when-cross-origin always;
location / {
proxy_pass http://APP_HOST:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; # QloApps uses this to detect HTTPS
proxy_read_timeout 300s; # installer / image regeneration
}
}