0
votes

Allright so I have website: http://www.l5roleplay.eu/ Which works fine under http. But it results in 502 error using https with CloudFlare https://www.l5roleplay.eu/ I'm not really sure why this happens.

I'm running my website on apache2 using php as back-end. I've already went through all the steps that CloudFlare gave me to put domain on their dns servers (I've also waited 24 hours).

I just wanna know why this doesn't work. Could this be because some of my php is not compatible under ssl?

Update:

It appears I needed to enable SSL mod in apache. I did it and now I get error 525 (SSL handshake failed). I tried to enable 443 port in my ufw, also I tried to add

<VirtualHost *:443> ServerName l5roleplay.eu DocumentRoot /var/www/html </VirtualHost>

into my 000-default.conf file, but it still gives me that 525 error.

1
Also I haven't mentioned but my apache2 is configured to output errors and notices into website. - Kudzė

1 Answers

0
votes

Solved it :)

502 error was because of ssl module being disabled on apache2. Which I enabled with: sudo a2enmod ssl sudo service apache2 restart

525 error was because I had set SSL protection to full when I didn't have any certificate on my vps. So cloudflare tried to communicate using https (encrypted) instead of http. For now I set it to medium, later I'm going to get certificate.

Also, in order to fix 525 error I did some steps which I didn't undo:

I added VirtualHost listener for 443 port: <VirtualHost *:443> ServerName l5roleplay.eu ServerAlias *.l5roleplay.eu DocumentRoot (path-to-website-root) </VirtualHost>

I also opened 443 port using ufw.