Apache2 Vhost FPM SetHandler related

Discussion in 'Developers' Forum' started by branov, May 15, 2020.

  1. branov

    branov Member

    Hi, I can see in the current 3.1 branch in the server/conf/vhost.conf.master that PHP-FPM handler it is just:
    Code:
    <FilesMatch "\.php[345]?$">
                                           SetHandler "proxy:unix:<tmpl_var name='fpm_socket'>|fcgi://localhost"
    </FilesMatch>
    
    which causing malfuction of mod_rewrite when script is not exists (404 page). In the master branch there is already
    Code:
    <FilesMatch "\.php[345]?$">
                            <If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
                                    SetHandler "proxy:unix:<tmpl_var name='fpm_socket'>|fcgi://localhost"
                            </If>
                    </FilesMatch>
    
    which fix this issue with non-existent locations. However, this
    Code:
    <If "-f %{DOCUMENT_ROOT} . '/' . %{REQUEST_URI}">
    
    causes error 404 in some Prestashops backends with URL like: /admin3993y88ic/index.php/improve/modules/manage?_token.... The fix of this behavior is change the above line to:
    Code:
    <If "-f '%{REQUEST_FILENAME}'">
    
    I tested this fix also on Wordpress and everything works properly. So, my question (before eventually I open merge request with this change) are there any consequences why you have used annotation which is in the master branch? Are there any particular reason for that? I am asking because I do not want to break something else if there was any good and in-place reason for this.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, please make a merge request for stable branch.
     
  3. branov

    branov Member

    OK, I will do that, thanks.
     

Share This Page