Back

SSL not working on production hosting

  • 0
  • Self Hosted
  • Tools
  • General
  • Web
Drake
5 Mar, 2023, 15:27

Btw, for multi line, it's best to use 3 back ticks instead of 1

TL;DR
The user is having issues with SSL not working on their production hosting. They have shared their Apache configuration and it seems that the proxy pass for port 443 is commented out, causing the issue. The solution is to uncomment the proxy pass lines and change them from HTTP to HTTPS.
Govind
5 Mar, 2023, 15:28

okay

Govind
5 Mar, 2023, 15:28

πŸ˜€

Drake
5 Mar, 2023, 15:29

Maybe your proxy pass over here should go to https

Govind
5 Mar, 2023, 15:30
TypeScript
ProxyPass / https://127.0.0.1:3031/
ProxyPassReverse / https://127.0.0.1:3031/
Govind
5 Mar, 2023, 15:30

like this ?

Govind
5 Mar, 2023, 15:34

no . . . . . it's not working

Govind
5 Mar, 2023, 15:36

last time i opened SMTP error and conclusion was we need to have ssl on appwrite.example.com

Govind
5 Mar, 2023, 15:37

so now I have a ssl on domain, all subdomains

Govind
5 Mar, 2023, 15:38

but it is not redirecting on https

Govind
5 Mar, 2023, 15:39
TypeScript
<VirtualHost *:80>
    ServerName appwrite.exampledev.xyz
    ServerAlias appwrite.exampledev.xyz
    ServerAdmin govinddeshmukh2001@gmail.com
    #DocumentRoot /var/www/appwrite.exampledev.xyz
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    ProxyPass / http://127.0.0.1:3030/
    ProxyPassReverse / http://127.0.0.1:3030/
    #proxy_set_header Host $host;
    #ProxyRequests Off
    ProxyPassReverseCookieDomain  "127.0.0.1:3030"  "appwrite.exampledev.xyz"
    ProxyPreserveHost On

</VirtualHost>

<VirtualHost *:443>
    ServerName appwrite.exampledev.xyz
    ServerAlias appwrite.exampledev.xyz
    ServerAdmin govinddeshmukh2001@gmail.com
    #DocumentRoot /var/www/appwrite.exampledev.xyz
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    #ProxyPass / http://127.0.0.1:3031/
    #ProxyPassReverse / http://127.0.0.1:3031/
    #proxy_set_header Host $host;
    #ProxyRequests Off
    #ProxyPassReverseCookieDomain  "127.0.0.1:3031"  "appwrite.exampledev.xyz"
    #ProxyPreserveHost On

    #SSL
    SSLEngine On
    SSLCertificateFile /etc/letsencrypt/live/exampledev.xyz/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/exampledev.xyz/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/exampledev.xyz/chain.pem
    SSLCipherSuite EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5
    SSLProtocol All -SSLv2 -SSLv3 -TLSv1
    SSLHonorCipherOrder On

</VirtualHost>
Govind
5 Mar, 2023, 15:40

here is complete vhost configuration

Drake
5 Mar, 2023, 15:42

Uhh the 443 proxy pass is commented out 🧐 and it's not https

Govind
5 Mar, 2023, 15:43
TypeScript
<VirtualHost *:80>
    ServerName appwrite.exampledev.xyz
    ServerAlias appwrite.exampledev.xyz
    ServerAdmin govinddeshmukh2001@gmail.com
    #DocumentRoot /var/www/appwrite.exampledev.xyz
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    ProxyPass / http://127.0.0.1:3030/
    ProxyPassReverse / http://127.0.0.1:3030/
    #proxy_set_header Host $host;
    #ProxyRequests Off
    ProxyPassReverseCookieDomain  "127.0.0.1:3030"  "appwrite.exampledev.xyz"
    ProxyPreserveHost On

</VirtualHost>

<VirtualHost *:443>
    ServerName appwrite.exampledev.xyz
    #ServerAlias appwrite.exampledev.xyz
    ServerAdmin govinddeshmukh2001@gmail.com
    #DocumentRoot /var/www/appwrite.exampledev.xyz
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    ProxyPass / https://127.0.0.1:3031/
    ProxyPassReverse / https://127.0.0.1:3031/
    #proxy_set_header Host $host;
    #ProxyRequests Off
    ProxyPassReverseCookieDomain  "127.0.0.1:3031"  "appwrite.exampledev.xyz"
    ProxyPreserveHost On

    #SSL
    SSLEngine On
    SSLCertificateFile /etc/letsencrypt/live/exampledev.xyz/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/exampledev.xyz/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/exampledev.xyz/chain.pem
    SSLCipherSuite EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5
    SSLProtocol All -SSLv2 -SSLv3 -TLSv1
    SSLHonorCipherOrder On

</VirtualHost>
Govind
5 Mar, 2023, 15:43

now ?????

Govind
5 Mar, 2023, 15:44
Drake
5 Mar, 2023, 15:45

Can you browse to your server using https on port 3031?

Govind
5 Mar, 2023, 15:45

okay

Govind
5 Mar, 2023, 15:46
Govind
5 Mar, 2023, 15:47

its working like this but ssl is not visible

Drake
5 Mar, 2023, 15:50

Maybe you can check Apache logs for why this error is happening then

Govind
5 Mar, 2023, 15:50

πŸ₯²

Govind
5 Mar, 2023, 15:55

not getting anything in logs

Govind
5 Mar, 2023, 15:55

please tell me correct apache2 configuration for appwrite

Drake
5 Mar, 2023, 16:14

Sorry I don't really know Apache. The only other resource I have is: https://github.com/appwrite/appwrite/discussions/4056

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more