# ==================== APEX (SITO) ==================== # HTTP -> HTTPS ServerName ${MIODOMINIO_COMPLETO} RewriteEngine On RewriteRule ^ https://${MIODOMINIO_COMPLETO}%{REQUEST_URI} [R=301,L] ErrorLog /var/log/apache2/${MIODOMINIO_COMPLETO}-error.log CustomLog /var/log/apache2/${MIODOMINIO_COMPLETO}-access.log combined # HTTPS (servizio sito - NO proxy qui) ServerName ${MIODOMINIO_COMPLETO} DocumentRoot /var/www/${MIODOMINIO_COMPLETO} SSLEngine on SSLCertificateFile /etc/letsencrypt/live/${MIODOMINIO}/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/${MIODOMINIO}/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf Protocols h2 http/1.1 Options Indexes FollowSymLinks AllowOverride All Require all granted DirectoryIndex index.html # (Opzionale per SPA Quasar/Vue) # RewriteEngine On # RewriteCond %{REQUEST_FILENAME} !-f # RewriteCond %{REQUEST_FILENAME} !-d # RewriteRule ^ /index.html [L] ErrorLog /var/log/apache2/${MIODOMINIO_COMPLETO}-error.log CustomLog /var/log/apache2/${MIODOMINIO_COMPLETO}-access.log combined # ==================== API ==================== # HTTP -> HTTPS ServerName ${MIOURL_API} RewriteEngine On RewriteRule ^ https://${MIOURL_API}%{REQUEST_URI} [R=301,L] ErrorLog /var/log/apache2/${MIOURL_API}-error.log CustomLog /var/log/apache2/${MIOURL_API}-access.log combined # HTTPS (proxy verso backend) ServerName ${MIOURL_API} ServerAdmin surya@riso.app SSLEngine on SSLCertificateFile /etc/letsencrypt/live/${MIODOMINIO}/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/${MIODOMINIO}/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf Protocols h2 http/1.1 ProxyPreserveHost On # ===== SCEGLI UNO DEI DUE BLOCCHI, in base al TUO backend su ${PORTA} ===== # --- Backend HTTP (più comune) --- # ProxyPass / http://127.0.0.1:${PORTA}/ retry=0 timeout=310 connectiontimeout=30 # ProxyPassReverse / http://127.0.0.1:${PORTA}/ # --- Backend HTTPS (nel tuo caso probabile, visto l’“Empty reply” via HTTP) --- SSLProxyEngine On SSLProxyVerify none SSLProxyCheckPeerName off ProxyPass / https://127.0.0.1:${PORTA}/ retry=0 timeout=310 connectiontimeout=30 ProxyPassReverse / https://127.0.0.1:${PORTA}/ # ========================================================================== Require all granted ProxyTimeout 310 Timeout 310 ProxyBadHeader Ignore ErrorLog /var/log/apache2/${MIOURL_API}-error.log CustomLog /var/log/apache2/${MIOURL_API}-access.log combined