Are you forwarding http to https?
Wait…
So https fails?
Does https continue to fail when you add back the WSGI lines to the http config?
I typed in https: in the url to test it didn’t forward it.
I would have thought it would have worked that way.
A redirect I suppose would be a mod rewrite anyway.
I have reverted to the working http code for now. So if you just tested it it wouldn’t be the amends you have just sent me. Except I left the Alias in as I know that works. Shall I disable the 3 lines for you to test now?
http works now; but https continues to fail:
curl: (7) Failed to connect to www.shentaichiacademy.co.uk port 443: Connection refused
Are those valid ?
(I don't know about WSGI)
They are required to run a Django application in Python
Okay commented them out in port 80 and restarted, but cant leave it like that for long.
That doesn’t fix port 443 - put it back
80 returns:
curl http://www.shentaichiacademy.co.uk/
<!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don’t have permission to access /
on this server.<br />
</p>
<hr>
<address>Apache/2.4.18 (Ubuntu) Server at www.shentaichiacademy.co.uk Port 80</address>
</body></html>
I have put it back now
It was giving a SSL_ERROR_INTERNAL_ERROR_ALERT
would that be in the apache access or error logs?
80 is ok now.
But 443 is still broken.
two different errors, one for each name (clues…):
curl https://www.shentaichiacademy.co.uk/
curl: (7) Failed to connect to www.shentaichiacademy.co.uk port 443: Connection refused
curl https://shentaichiacademy.co.uk/
curl: (35) gnutls_handshake() failed: Internal error
Lets begin back closer to the beginning…
Please show:
ls -l /etc/apache2/sites-enabled/
manager@web-server:/etc/apache2/sites-enabled$ ls -l /etc/apache2/sites-enabled/total 4
lrwxrwxrwx 1 root root 35 Nov 27 2016 000-default.conf -> ../sites-available/000-default.conf
lrwxrwxrwx 1 root root 41 Dec 18 2016 archery-for.me.uk.conf -> ../sites-available/archery-for.me.uk.conf
lrwxrwxrwx 1 root root 47 May 27 20:30 shentaichiacademy.co.uk.conf -> ../sites-available/shentaichiacademy.co.uk.conf
lrwxrwxrwx 1 root root 64 May 27 19:38 shentaichiacademy.co.uk-le-ssl.conf -> /etc/apache2/sites-available/shentaichiacademy.co.uk-le-ssl.conf
Please show:
cat /etc/apache2/sites-enabled/000-default.conf
manager@web-server:/etc/apache2/sites-enabled$ cat /etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
ok that is port 80 only…
Please show:
apache2ctl -t -D DUMP_VHOSTS | grep 443
AH00526: Syntax error on line 54 of /etc/apache2/sites-enabled/shentaichiacademy.co.uk-le-ssl.conf:
SSLCertificateFile: file '/etc/letsencrypt/live/www.shentaichiacademy.co.uk/fullchain.pem' does not exist or is empty
Show:
ls -l /etc/letsencrypt/live/
manager@web-server:/etc/apache2/sites-enabled$ ls -l /etc/letsencrypt/live/
ls: cannot open directory '/etc/letsencrypt/live/': Permission denied
manager@web-server:/etc/apache2/sites-enabled$ sudo su
root@web-server:/etc/apache2/sites-enabled# ls -l /etc/letsencrypt/live/
total 4
drwxr-xr-x 2 root root 4096 May 27 09:37 www.shentaichiacademy.co.uk
root@web-server:/etc/apache2/sites-enabled#