I have SSL certificate and I added to my web site and working well but when I access to web site redirect to automatically http. How can I prevent. You can access my apache.conf file to below.
ServerName geoserver.intelliyazilim.com
SSLProxyEngine on
ProxyPreserveHost On
ProxyPass /geoserver http://mydomain:8080/geoserver
ProxyPassReverse /geoserver http://mydomain:8080/geoserver
# Redirect HTTP to HTTPS
<VirtualHost *:80>
    ServerName mydomain
    ServerAlias www.mydomain
    RewriteEngine On
    RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>
# HTTPS configuration
<VirtualHost _default_:443>
    ServerName mydomain
    ServerAlias www.mydomain
    # SSL/TLS settings
    SSLEngine on
    SSLCertificateFile /home/intelli/Desktop/_.intelliyazilim.com.crt
    SSLCertificateKeyFile /home/intelli/Desktop/KEY.key
    # ProxyPass settings
    ProxyPreserveHost On
    ProxyPass /geoserver https://mydomain:8081/geoserver
    ProxyPassReverse /geoserver https://mydomain:8081/geoserver
</VirtualHost>
 
    