|
|
|
|
|
by justincormack
5548 days ago
|
|
It really is trivial to set up an fcgi process to run PHP directly from nginx. On the nginx side, something like my config:
location ~ \.php {
fastcgi_index index.php;
include fastcgi_params;
fastcgi_pass localhost:55155;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
} Then you just need to run php in fcgi daemon mode which is built in, use php-cgi -b localhost:55155 to match that setup... more details on http://wiki.nginx.org/PHPFcgiExample I found this much simpler than running nginx and apache... |
|
tl:dr is that the configuration you're suggesting will leave a site open to arbitrary code execution if the site allows for user uploads.