how do I restore them, and once restored, how do I choose and enable?
In sites-available reside all the configuration files for all potential sites. In sites-enabled reside symbolic links to sites-available for active sites. The script a2ensite
can do this symlinking for you. See also the tutorial I linked above.
I have a feeling that Wordpress is involved in this in some way.
Done lots of checks.
Apache2 server seems to be running.
Any ideas best place to go for help?
I've been through
/etc/apache2/sites-enabled
and
/etc/apache2/sites-available
and nothing worked using
a2ensite and a2dissite
Probarly becasue they had been modified by certbot scripts to use SSL/ TLS .pem, .pub files etc, which no longer exist, whatever.
So I now have a conf file
floheating.co.uk.conf
which I beleive is set-up and enabled.
But still nothing at floheating.co.uk
apachectl -S
is your friend here - use it
Hi @kes
there
is not nothing, there is a loop, see https://check-your-website.server-daten.de/?q=floheating.co.uk
Domainname | Http-Status | redirect | Sec. | G |
---|---|---|---|---|
• http://floheating.co.uk/ 34.105.177.183 | 301 | http://floheating.co.uk/ Html is minified: 100,00 % | 0.054 | L |
• http://www.floheating.co.uk/ 34.105.177.183 | 301 | http://www.floheating.co.uk/ Html is minified: 100,00 % | 0.050 | L |
• https://floheating.co.uk/ 34.105.177.183 | -2 | 1.076 | V | |
ConnectFailure - Unable to connect to the remote server | ||||
• https://www.floheating.co.uk/ 34.105.177.183 | -2 | 1.077 | V | |
ConnectFailure - Unable to connect to the remote server |
http redirects to the same page.
Change that redirect, so https is the destination.
Are you still stuck?
Please show:
apachectl -S
I have something now. If you check floheating.co.uk you will see it's up, but it seems a bit slower.
I am wandering if I can do the certbot certs manually ie find a simple instruction for generating .pem .pub files etc, becasue I though this was going to be a synch, like the initial ssl / tls cert install, but it wasn't. It was a rabbit hole, which I was not ready for, so I feel a manual placement of the appropriate files might be better. At least I then know whats happening. Still thinking about that.
Thanks for all the help BTW
$ apachectl -S
VirtualHost configuration:
*:80 floheating.co.uk (/etc/apache2/sites-enabled/floheating.co.uk.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used
Can anyone explain the:
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used
Currently here is where things are
ssl is enabled with sudo a2enmod ssl
But it only works if I comment out line 33 in this file,
/etc/apache2/sites-available/floheating.co.uk.conf
as shown below. If I enable line 33, the site does not load
You don't have a port 443 vHost.
And why has your port 80 vHost only one domain name? No template Certbot can use.
Add the www Alias, again apachectl -S
, if that's ok, certbot --reinstall -d firstdomainname -d seconddomainname
.
These are not one and the same:
You need to ensure there are no real files in the /sites-enabled/
folder.
All the real files should be in the /site-available/
folder.
Only symbolic links "shortcuts" are created in the /sites-enabled/
folder.
Please show:
ls -l /etc/apache2/sites-enabled/
You can ignore that.
Line 33 would send everything to HTTPS.
But there is no HTTPS site running:
^^ ONLY HTTP ^^
I'm an apache newb doing this on limited time.
I don't know why to port 443, or how to have p 443.
If you can suggest I will add.
"why no port 80 vHost only".
Can you suggest what I should add and where
port 443 is the port used for HTTPS.
FIRST: Cleanup the /sited-enabled/
folder.
Step #1: a2dissite floheating.co.uk.conf
Step #2: rm /etc/apache2/sites-enabled/floheating.co.uk.conf
Step #3: a2ensite floheating.co.uk.conf
Then show output of:
ls -l /etc/apache2/sites-enabled/
/etc/apache2/sites-enabled definatley only has "-l" symbolic links.
There are no files in there at all.
kes@wordpress:/etc/apache2/sites-available$ ls -la
/etc/apache2/sites-enabled
total 8
drwxr-xr-x 2 root root 4096 Jan 12 11:52 .
drwxr-xr-x 8 root root 4096 Jan 12 13:58 ..
lrwxrwxrwx 1 root root 40 Jan 12 11:52 floheating.co.uk.conf -> ../sites-available/floheating.co.uk.conf
Much better!
Now show us:
apachectl -S
and compare to before:
[with only one name showing]
FIRST: Cleanup the
/sited-enabled/
folder.
Step #1:a2dissite floheating.co.uk.conf
Step #2:rm /etc/apache2/sites-enabled/floheating.co.uk.conf
Step #3:a2ensite floheating.co.uk.conf
Then show output of:
ls -l /etc/apache2/sites-enabled/
done all of that, output shows one symlink and floheating.co.uk site still works
kes@wordpress:/etc/apache2/sites-enabled$ ls -l /etc/apache2/sites-enabled/
total 0
lrwxrwxrwx 1 root root 40 Jan 12 15:39 floheating.co.uk.conf -> ../sites-available/floheating.co.uk.conf
Now show us the new output of:
apachectl -S
[It should show two names]
Here is the output of apachectl -S
kes@wordpress:~$ apachectl -S
VirtualHost configuration:
*:80 floheating.co.uk (/etc/apache2/sites-enabled/floheating.co.uk.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used
please restart apache
and show that again
restarted apache.
here result of apachectl -S
kes@wordpress:~$ apachectl -S
VirtualHost configuration:
*:80 floheating.co.uk (/etc/apache2/sites-enabled/floheating.co.uk.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used