https://bugs.koozali.org/show_bug.cgi?id=12202

            Bug ID: 12202
           Summary: Limit log noise in /var/log/httpd/error_log
    Classification: SME Server
           Product: SME Server Future
           Version: Unknown
          Hardware: ---
                OS: ---
            Status: CONFIRMED
          Severity: minor
          Priority: P3
         Component: New Feature Request
          Assignee: bugt...@lists.contribs.org
          Reporter: te...@pialasse.com
        QA Contact: bugt...@lists.contribs.org
                CC: contribteam@lists.contribs.org,
                    jesper.ho...@ibsgaarden.dk
        Depends on: 12201
  Target Milestone: ---

+++ This bug was initially created as a clone of Bug #12201 +++

After upgrading to SME 10.1, I started receiving lots of messages like this in
/var/log/httpd/error_log:

[Sun Sep 25 22:26:36.887916 2022] [proxy_fcgi:error] [pid 22050] [client
64.227.108.223:32836] AH01071: Got error 'Primary script unknown'

The messages are related to entries like this in /var/log/httpd/access_log:

ibsgaarden.dk 64.227.108.223 - - [25/Sep/2022:22:26:36 +0200] "POST
/wordpress/xmlrpc.php HTTP/1.1" 404 16 "-" "Mozilla/5.0 (Windows; U; Windows NT
5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7"

I suggest making the following changes to 
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/92wordpress :

69a70
>         $OUT .= "       <If -f %{REQUEST_FILENAME}>";
70a72
>         $OUT .= "       </If>";

Making the fragment look like this:

          $OUT .= "     <FilesMatch \.php\$\>\n";
          $OUT .= "       <If -f %{REQUEST_FILENAME}>";
          $OUT .= "             SetHandler
\"proxy:unix:/var/run/php-fpm/php$version.sock|fcgi://localhost\"\n";
          $OUT .= "       </If>";
          $OUT .= "     </FilesMatch>\n";

So, we only do the SetHandler stuff, if the requested php file indeed exists.


Referenced Bugs:

https://bugs.koozali.org/show_bug.cgi?id=12201
[Bug 12201] Limit log noise in /var/log/httpd/error_log
-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail contribteam-unsubscr...@lists.contribs.org
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/

Reply via email to