Bug 64554

Summary: Wrong soft link causes config file not loaded
Product: Apache httpd-2 Reporter: zj713300
Component: mod_sslAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: trivial    
Priority: P2    
Version: 2.4.41   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

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.