Wrong soft link causes config file not loaded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(written 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 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. I don't sure whether I should add an issue.

Thanks.

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux