Not Found: The requested URL was not found on this server Apache/2.4.18 (Ubuntu) Server at *URL* Port 443

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: mail.cnic-n9portal.net

I ran this command: I tried going to website address (mail.cnic-n9portal.net) in Google Chrome and it use to display correctly (roundcube login page) before I renewed the certs and now I'm getting the following error on webpage:

Screenshot 2023-06-07 103913

It produced this output:

My web server is (include version): Apache2

The operating system my web server runs on is (include version): Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-1128-aws x86_64)

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 0.31.0

Do I need to redirect something in a config file somewhere?

That's completely up to you.

We can see your "home" page and Let's Encrypt certs just fine. You need to configure your apache server to handle page requests. See Apache docs or Apache support forum

And this looks good.

curl -i https://mail.cnic-n9portal.net
HTTP/1.1 200 OK
Date: Wed, 07 Jun 2023 14:47:58 GMT
Server: Apache/2.4.18 (Ubuntu)
3 Likes

Looks to me it is how your web site and server are set up

$ curl -i  https://mail.cnic-n9portal.net/
HTTP/1.1 200 OK
Date: Wed, 07 Jun 2023 14:48:48 GMT
Server: Apache/2.4.18 (Ubuntu)
Last-Modified: Fri, 29 Sep 2017 16:22:07 GMT
ETag: "4e-55a566d12a4c3"
Accept-Ranges: bytes
Content-Length: 78
Vary: Accept-Encoding
Content-Type: text/html

<html><head><meta HTTP-EQUIV="REFRESH" content="0; url=/mail/"></head></html>
$ curl -i  https://mail.cnic-n9portal.net/mail
HTTP/1.1 404 Not Found
Date: Wed, 07 Jun 2023 14:48:52 GMT
Server: Apache/2.4.18 (Ubuntu)
Content-Length: 285
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.18 (Ubuntu) Server at mail.cnic-n9portal.net Port 443</address>
</body></html>
1 Like

Here details on Apache can be found in documentation and forums:

1 Like

@MikeMcQ @Bruce5051 So the certificate is fine? It's the apache that's the problem? Is this the right location to find the actual LetsEncrypt .crt and .key files?

Yes.

Yes; as @MikeMcQ demonstrated Not Found: The requested URL was not found on this server Apache/2.4.18 (Ubuntu) Server at *URL* Port 443 - #2 by MikeMcQ

Using the online tool SSL Server Test (Powered by Qualys SSL Labs) succeeded SSL Server Test: mail.cnic-n9portal.net (Powered by Qualys SSL Labs) with a Grade of B.

Although what you have shown looks correct, Apache can be tricky.
I would begin at the beginning and take nothing for granted.
Let's see:
sudo apachectl -t -D DUMP_VHOSTS

2 Likes

@rg305

hmm...

Did the "mail" system previously work via?:
http://mail.cnic-n9portal.net/mail/

What shows?:
ls -l /etc/apache2/sites-available/

2 Likes

Has it ever worked?

3 Likes

@rg305 Yes it has. After I updated the cert, this is when this started

Something is missing from this puzzle.

What shows?:
ls -l /var/www/html/
grep -i documentroot /etc/apache2/sites-enabled/*

2 Likes

Offtopic: yikes, do these redirects still exist? Please upgrade to proper HTTP level redirects using Location headers..

2 Likes

Please see Post #4 for where to get help for Apache.

3 Likes

@Bruce5051 I also posted on ApacheLounge. Hopefully someone responds soon.

2 Likes

@rg305

I don't see a mail folder in the /var/www/html folder.

2 Likes

The You have new mail in /var/mail/root is a message from the Unix shell indicating that it checked for new e-mail to the current user. This is a traditional Unix thing and it's not output from the ls command or related to the web server configuration; it just happened to pop up right in between those two commands. The shell displays it (if appropriate) immediately before displaying a new prompt for the user to type a new command, so it will always appear right after the output (if any) of the previous command.

3 Likes