Configuração porta 80
<VirtualHost *:80>
  DocumentRoot "/var/www/leantime_v3/"
  ServerName projetos.dev.omnify.cx
  ServerAlias projetos.dev.omnify.cx
  ErrorLog ${APACHE_LOG_DIR}/projetos_v3_error.log
  CustomLog ${APACHE_LOG_DIR}/projetos_v3_access.log combined
  #Redirect / https://projetos.omnify.cx/
 <Directory /var/www/leantime_v3/public>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
<Directory /var/www/leantime_v3/public>
        <FilesMatch "\.php$">
            SetHandler "proxy:unix:/run/php/php8.1-fpm.sock|fcgi://localhost/"
        </FilesMatch>
    </Directory>
<Location /.well-known/acme-challenge/>
        AllowOverride None
        Require all granted
    </Location>
<Location "/install">
  RewriteEngine  on
  RewriteRule .*/(.*) "/index.php?install=true" [P,L]
</Location>
  # Can't use Location block since it would overshadow all the other proxypass directives on CentOS
RewriteCond %{SERVER_NAME} =projetos.dev.omnify.cx [OR]
RewriteCond %{SERVER_NAME} =projetos.omnify.cx
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

Configuração porta 443
<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName projetos.omnify.cx
    DocumentRoot "/var/www/leantime"
    SSLEngine On
    ErrorLog ${APACHE_LOG_DIR}/projetos_error.log
    CustomLog ${APACHE_LOG_DIR}/projetos_access.log combined
    # Ativa o módulo de reescrita
    RewriteEngine On
    ServerAlias projetos.omnify.cx
    SSLCertificateFile /etc/letsencrypt/live/projetos.omnify.cx/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/projetos.omnify.cx/privkey.pem
    Include /etc/letsencrypt/options-ssl-apache.conf
    # Configuração do site principal (/var/www/leantime) usando PHP 7.4
    <Directory /var/www/leantime>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    <FilesMatch "\.php$">
        SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost/"
    </FilesMatch>
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName projetos.dev.omnify.cx
    DocumentRoot "/var/www/leantime_v3/public"
    SSLEngine On
    ErrorLog ${APACHE_LOG_DIR}/projetos_dev_error.log
    CustomLog ${APACHE_LOG_DIR}/projetos_dev_access.log combined
    # Ativa o módulo de reescrita
    RewriteEngine On
    ServerAlias projetos.dev.omnify.cx
    SSLCertificateFile /etc/letsencrypt/live/projetos.dev.omnify.cx/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/projetos.dev.omnify.cx/privkey.pem
    Include /etc/letsencrypt/options-ssl-apache.conf
    # Configuração do site principal (/var/www/leantime) usando PHP 7.4
    <Directory /var/www/leantime_v3/public>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    <FilesMatch "\.php$">
        SetHandler "proxy:unix:/run/php/php8.1-fpm.sock|fcgi://localhost/"
    </FilesMatch>
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>