Bug 64554 - Wrong soft link causes config file not loaded
Summary: Wrong soft link causes config file not loaded
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_ssl (show other bugs)
Version: 2.4.41
Hardware: PC Linux
: P2 trivial (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-24 03:08 UTC by zj713300
Modified: 2020-06-24 03:08 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zj713300 2020-06-24 03:08:25 UTC
Sorry for my bad English.

My ubuntu version is '20.04 LTS'.
My apache2 httpd version is 'apache2/focal,now 2.4.41-4ubuntu3 amd64'.
My curl version is 'curl/focal,now 7.68.0-1ubuntu2 amd64'(ubuntu).
My curl version is 'curl 7.60.0 (x86_64-w64-mingw32) libcurl/7.60.0 OpenSSL/1.0.2o (WinSSL) zlib/1.2.11 libidn2/2.0.5 nghttp2/1.31.1'(MSYS).

When I add SSL support for HTTPS on my site, I use 'ln' command incorrectly because I didn't know 'a2ensite' command until just now.

The sites-available directory is like:
000-default.conf mysite.conf default-ssl.conf phpmyadmin.conf
All of these are written in correct syntax.

And the sites-enabled directory is like:
000-default.conf mysite.conf default-ssl.conf phpmyadmin.conf
All of these are soft links to the corresponding file in sites-available.


The problem happens when the phpmyadmin.conf links to itself or somewhere not exist.
Then I found 000-default.conf is loaded correctly because the mod_rewrite(used in 000-default.conf, rewrite http requests to https) works.
But https requests(https://domain) from chrome received ERR_SSL_PROTOCOL_ERROR. Curl got SSL23_GET_SERVER_HELLO:unknown protocol(on MSYS) and SSL3_GET_RECORD:wrong version number(on ubuntu). It works when I changes the request URL to 'http://domain:443'. That means default-ssl.conf didn't work.
All works correctly after I fixed the wrong soft link.

It's my mistake, I see. But to my surprise, apache2 didn't tell me any warning or error message. And no error logs(/var/log/apache2/error.log and /var/log/apache2/access.log). In my opinion, apache2 should report the config files cannot be opened.

Thanks.