Hot to get list of engines running?
I need to block files in开发者_StackOverflow directory from being executed, i was recommended to set
php_flag engine off
Now i need go get list of other engines running and disable each of them.
I guess you are looking to secure a kind of a file upload directory from executing source codes.
1) Security checks :
You may first check whether this directive *php_flag engine off* is effectively taken into account by your server, putting a php file and calling it from your browser. As far as I remember, this directive works with Apache2 and above but not below.
Provided that you can activate additional php modules (mod_mime), I guess you could also complete your .htaccess file by 2 lines :
RemoveHandler .php .phtml .php3 .php4 .php5 .cgi .fcgi
RemoveType .php .phtml .php3 .php4 .php5 .cgi .fcgi
php_flag engine off
2) "Running engines" :
Your question is not clear to me and in any case, the answer depends on your OS and distro. On a debian, you'll show up information about Apache, Bind DNS, or Postfix smtp server and their port numbers like this :
netstat -tulpn
3) AddHandler :
But maybe you are looking for the file types handled by the server in a particular directory. For this, you have to check your apache.conf or httpd.conf file and find which types of files are handled in your conf file(s). Then you shall check for the AddHandler directives. To find those lines on a debian machine with apache2 installed from the standard packages into the default directories :
grep --color -Rn -e "handler" -e "type" /etc/apache2/*.conf
精彩评论