- Code: Select all
What various directories ?
The new certificate I've called certSept24.pem, and put in these directories:
/etc/pki/ca-trust/extracted/openssl
/etc/pki/ca-trust/extracted/pem
/etc/pki/tls/certs
(I've just discovered my old certificate was also in /etc/pki/ca-trust/source/anchors, hence my question where the certificate should be placed, the internet and various distro's all have different concepts).
Although, the /etc/pki/tls/certs/certSept24.pem file is weird:
- Code: Select all
ls -al
total 32
drwxr-xr-x 2 root root 4096 Sep 20 21:14 ./
drwxr-xr-x 7 root root 4096 Sep 20 21:15 ../
lrwxrwxrwx 1 root root 60 Feb 21 2024 ca-bundle.crt -> ../../../../etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
lrwxrwxrwx 1 root root 66 Feb 21 2024 ca-bundle.trust.crt -> ../../../../etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt
-rw-r--r-- 1 root root 2049 Sep 20 21:13 certSept24.pem
-rw-r--r-- 1 root root 1192 May 27 2022 httpd.pem
-rw-r--r-- 1 root root 1192 Sep 20 20:25 httpd.pem.orig
-rw-r--r-- 1 root root 2516 Sep 6 22:31 Makefile
So it is a normal file, yet in dolphin, under properties, it's shown as a link, pointing to:
- Code: Select all
../../../etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
So running the Curl line again, I'm not really sure what I'm looking at, here's output using both localhost and the IP:
When run as https: self-signed certificate issue.
- Code: Select all
[root@localhost /etc/pki/tls/certs]# curl -I https://localhost/apps/settings/js/esm-test.mjs
curl: (60) SSL certificate problem: self-signed certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
[root@localhost /etc/pki/tls/certs]# curl -I https://10.0.0.99/apps/settings/js/esm-test.mjs
curl: (60) SSL certificate problem: self-signed certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
And when run as http (remembering I have apache set to redirect http to https), I get some response.
- Code: Select all
[root@localhost /etc/pki/tls/certs]# curl -I http://localhost/apps/settings/js/esm-test.mjs
HTTP/1.1 301 Moved Permanently
Date: Sun, 22 Sep 2024 12:31:10 GMT
Server: Apache/2.4.62 (Mageia) OpenSSL/3.0.15 PHP/8.2.23
Location: https://10.0.0.99/apps/settings/js/esm-test.mjs
Content-Type: text/html; charset=iso-8859-1
[root@localhost /etc/pki/tls/certs]# curl -I http://10.0.0.99/apps/settings/js/esm-test.mjs
HTTP/1.1 301 Moved Permanently
Date: Sun, 22 Sep 2024 12:31:45 GMT
Server: Apache/2.4.62 (Mageia) OpenSSL/3.0.15 PHP/8.2.23
Location: https://10.0.0.99/apps/settings/js/esm-test.mjs
Here's using curl "-k" and "--insecure" on
https://localhost, internal server error:
- Code: Select all
[root@localhost /etc/pki/tls/certs]# curl -k -I https://localhost/apps/settings/js/esm-test.mjs
HTTP/1.1 500 Internal Server Error
Date: Sun, 22 Sep 2024 12:28:44 GMT
Server: Apache/2.4.62 (Mageia) OpenSSL/3.0.15 PHP/8.2.23
Strict-Transport-Security: max-age=15552000; includeSubDomains
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: noindex, nofollow
X-XSS-Protection: 1; mode=block
X-Powered-By: PHP/8.2.23
[b]REDACTED[/b]
Set-Cookie: nc_sameSiteCookielax=true; path=/owncloud; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
Set-Cookie: nc_sameSiteCookiestrict=true; path=/owncloud; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
Set-Cookie: [b]REDACTED[/b]; path=/owncloud; secure; HttpOnly; SameSite=Lax
Connection: close
Content-Type: text/html; charset=UTF-8
[root@localhost /etc/pki/tls/certs]# curl --insecure -I https://localhost/apps/settings/js/esm-test.mjs
HTTP/1.1 500 Internal Server Error
Date: Sun, 22 Sep 2024 12:30:01 GMT
Server: Apache/2.4.62 (Mageia) OpenSSL/3.0.15 PHP/8.2.23
Strict-Transport-Security: max-age=15552000; includeSubDomains
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: noindex, nofollow
X-XSS-Protection: 1; mode=block
X-Powered-By: PHP/8.2.23
[b]REDACTED[/b]
Set-Cookie: nc_sameSiteCookielax=true; path=/owncloud; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
Set-Cookie: nc_sameSiteCookiestrict=true; path=/owncloud; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
Set-Cookie: [b]REDACTED[/b]; path=/owncloud; secure; HttpOnly; SameSite=Lax
Connection: close
Content-Type: text/html; charset=UTF-8
Here's using curl "-k" and "--insecure" on
https://10.0.0.99, Internel Server Error
- Code: Select all
[root@localhost /etc/pki/tls/certs]# curl -k -I https://10.0.0.99/apps/settings/js/esm-test.mjs
HTTP/1.1 500 Internal Server Error
Date: Sun, 22 Sep 2024 12:30:14 GMT
Server: Apache/2.4.62 (Mageia) OpenSSL/3.0.15 PHP/8.2.23
Strict-Transport-Security: max-age=15552000; includeSubDomains
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: noindex, nofollow
X-XSS-Protection: 1; mode=block
X-Powered-By: PHP/8.2.23
[b]REDACTED[/b]
Set-Cookie: nc_sameSiteCookielax=true; path=/owncloud; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
Set-Cookie: nc_sameSiteCookiestrict=true; path=/owncloud; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
Set-Cookie: [b]REDACTED[/b]; path=/owncloud; secure; HttpOnly; SameSite=Lax
Connection: close
Content-Type: text/html; charset=UTF-8
[root@localhost /etc/pki/tls/certs]# curl --insecure -I https://10.0.0.99/apps/settings/js/esm-test.mjs
HTTP/1.1 500 Internal Server Error
Date: Sun, 22 Sep 2024 12:30:28 GMT
Server: Apache/2.4.62 (Mageia) OpenSSL/3.0.15 PHP/8.2.23
Strict-Transport-Security: max-age=15552000; includeSubDomains
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: noindex, nofollow
X-XSS-Protection: 1; mode=block
X-Powered-By: PHP/8.2.23
[b]REDACTED[/b]
Set-Cookie: nc_sameSiteCookielax=true; path=/owncloud; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
Set-Cookie: nc_sameSiteCookiestrict=true; path=/owncloud; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
Set-Cookie: [b]REDACTED[/b]; path=/owncloud; secure; HttpOnly; SameSite=Lax
Connection: close
Content-Type: text/html; charset=UTF-8
And here's when using "-k" and "--insecure" on http
- Code: Select all
[root@localhost /etc/pki/tls/certs]# curl --insecure -I http://10.0.0.99/apps/settings/js/esm-test.mjs
HTTP/1.1 301 Moved Permanently
Date: Sun, 22 Sep 2024 12:57:05 GMT
Server: Apache/2.4.62 (Mageia) OpenSSL/3.0.15 PHP/8.2.23
Location: https://10.0.0.99/apps/settings/js/esm-test.mjs
Content-Type: text/html; charset=iso-8859-1
[root@localhost /etc/pki/tls/certs]# curl --insecure -I http://localhost/apps/settings/js/esm-test.mjs
HTTP/1.1 301 Moved Permanently
Date: Sun, 22 Sep 2024 12:57:39 GMT
Server: Apache/2.4.62 (Mageia) OpenSSL/3.0.15 PHP/8.2.23
Location: https://10.0.0.99/apps/settings/js/esm-test.mjs
Content-Type: text/html; charset=iso-8859-1
[root@localhost /etc/pki/tls/certs]# curl -k -I http://10.0.0.99/apps/settings/js/esm-test.mjs
HTTP/1.1 301 Moved Permanently
Date: Sun, 22 Sep 2024 12:57:49 GMT
Server: Apache/2.4.62 (Mageia) OpenSSL/3.0.15 PHP/8.2.23
Location: https://10.0.0.99/apps/settings/js/esm-test.mjs
Content-Type: text/html; charset=iso-8859-1
[root@localhost /etc/pki/tls/certs]# curl -k -I http://localhost/apps/settings/js/esm-test.mjs
HTTP/1.1 301 Moved Permanently
Date: Sun, 22 Sep 2024 12:58:04 GMT
Server: Apache/2.4.62 (Mageia) OpenSSL/3.0.15 PHP/8.2.23
Location: https://10.0.0.99/apps/settings/js/esm-test.mjs
Content-Type: text/html; charset=iso-8859-1
So, it appears to work when http is specifically called for, which apache then redirects: but when https is specified it breaks.