File: //etc/apache2/sites-enabled/bursacraiova.conf
<VirtualHost *:80>
ServerName bursacraiova.ro
ServerAlias www.bursacraiova.ro
CustomLog ${APACHE_LOG_DIR}/bursacraiova.access combined
ErrorLog ${APACHE_LOG_DIR}/bursacraiova.error
DocumentRoot /home/florin/sites/bursacraiova/current/public
SetEnvIf X-Forwarded-Proto https HTTPS=on
SetEnv HTTPS on
DirectoryIndex index.php index.html index.htm
<Directory "/home/florin/sites/bursacraiova/current/public">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php/php7.4-fpm-florin.sock|fcgi://localhost"
</FilesMatch>
RewriteEngine on
RewriteCond %{SERVER_NAME} =bursacraiova.ro [OR]
RewriteCond %{SERVER_NAME} =www.bursacraiova.ro
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>