File: //etc/apache2/sites-available/simsoft.conf
<VirtualHost *:80>
ServerName simsoft.ro
ServerAlias www.simsoft.ro
CustomLog ${APACHE_LOG_DIR}/simsoft.access combined
ErrorLog ${APACHE_LOG_DIR}/simsoft.error
DocumentRoot /home/florin/sites/simsoft/current/public
SetEnvIf X-Forwarded-Proto https HTTPS=on
SetEnv HTTPS on
DirectoryIndex index.php index.html index.htm
<Directory "/home/florin/sites/simsoft/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} =www.simsoft.ro [OR]
RewriteCond %{SERVER_NAME} =simsoft.ro
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>