Jump to content
Froxlor Forum
  • 0

PHP-FPM Security (Limit Extensions)


gunnyst

Question

Hello again, hope you don't mind me coming up with another issue (including proposal for solution obviously).

I had another issue using PHP-FPM, where I cannot get my .XML files parsed by the PHP interpreter even though I have this in my .htaccess:

<FilesMatch "\.(xml)$">
  SetHandler php5-fastcgi
  Action php5-fastcgi /fastcgiphp
  Options +ExecCGI
</FilesMatch>

It turns out that there is a limit imposed by the security.limit_extensions setting which defaults to .php only. My .XML files are used in order to automatically return the correct autodiscover/autoconfig settings to Outlook/Thunderbird and the like and therefor need to be "dynamic XML files", but I could imagine someone else needing .phps or the like...

Currently I have gone so far as to add some stuff to /var/www/froxlor/lib/classes/phpinterface/class.phpinterface_fpm.php @ 248:

if ($this->_domain['domain'] == 'autodiscover.mydomain.tld') {
        $fpm_config.= 'security.limit_extensions = .php .xml'."\n";
}

But again, this could be a new string-based setting in the new PHP-FPM versions section.

(Slowly I'll get in touch with the code structure I promise...)

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...