Simple is good for me
a2ensite www.kyoikulogistics.com
apachectl -k graceful
Then let's see this:
apachectl -S
Ok, here we go.
> apachectl -S AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message VirtualHost configuration: 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 proxy: using_defaults Mutex ssl-cache: using_defaults Mutex default: dir="/var/lock/apache2" mechanism=fcntl Mutex mpm-accept: using_defaults PidFile: "/var/run/apache2/apache2.pid" Define: DUMP_VHOSTS Define: DUMP_RUN_CFG Define: ENABLE_USR_LIB_CGI_BIN User: name="www-data" id=33 Group: name="www-data" id=33
Where is the active vHost?
doh.
a2ensite www.kyoikulogistics.com.conf
apachectl -k graceful
I think the .conf
is needed.
Hmm, good question. Just tried to list virtual servers under Apache...and there are none.
It was there when I edited the contents of www.kyoikulogistics.com.conf....but gone now.
For future ref, adding this would be simpler than risking requiring Apache modifications and restarts:
<Location /.well-known/acme-challenge/>
DocumentRoot /var/www/html
</Location>
Understand that what you do now will have to stand the test of time.
In time more and more vhost configs will be added.
Eventually mistakes will be made...
And as I've said plenty of times, Apache is notorious for running at all costs.
So it will run and then they won't understand why things just stopped renewing (all of a sudden!).
Yeah I'm always thinking 9 months down the road...
Maybe need to step back now....
I'm getting:
> a2ensite www.kyoikulogistics.com.conf ERROR: Site www.kyoikulogistics.com does not exist!
ls -lRa /etc/apache2/sites-available
ls -lRa /etc/apache2/sites-enabled
sudo ls -lRa /etc/apache2/sites-available
/etc/apache2/sites-available:
total 16
drwxr-xr-x 3 root root 4096 Jan 27 10:10 .
drwxr-xr-x 9 root root 4096 Jan 27 08:42 ..
drwxr-xr-x 2 root root 4096 Jan 27 09:55 cruft
-rw-r--r-- 1 root root 254 Jan 27 10:10 www.kyouikulogistics.com.conf
/etc/apache2/sites-available/cruft:
total 32
drwxr-xr-x 2 root root 4096 Jan 27 09:55 .
drwxr-xr-x 3 root root 4096 Jan 27 10:10 ..
-rw-r--r-- 1 root root 1855 Jan 27 08:46 000-default.conf
-rw-r--r-- 1 root root 442 May 14 2020 default-ssl.conf
-rw-r--r-- 1 root root 243 May 14 2020 le-redirect-www.kyouikulogistics.com.conf
-rw-r--r-- 1 root root 6338 Jun 11 2018 OLD-default-ssl.conf
-rw-r--r-- 1 root root 1398 Jan 27 08:46 webmin.1611560222.conf
and
> sudo ls -lRa /etc/apache2/sites-enabled /etc/apache2/sites-enabled: total 8 drwxr-xr-x 2 root root 4096 Jan 27 09:53 . drwxr-xr-x 9 root root 4096 Jan 27 08:42 ..
^^ has a "oUi" in the name
^^ well, as it says "does not" - LOL
Face plant...so I will do
sudo a2ensite www.kyouikulogistics.com.conf
Right?
P.S. the u is necessary
First, what's the CORRECT name?
Speaking of which...
Where is that face plant emoji?
I tried looking for it the other day.
I need to bookmark that one I think
The file contents and name look correct. Proceed with a2ensite then apachectl -k graceful.
Hmm, for some reason apachectl -k graceful failed...
ls -lRa /etc/apache2/sites-enabled