Hacker News new | ask | show | jobs
by msimpson 3213 days ago
Yes, you can generally think of it as a replacement for mod_php as Unit would parse requests from NGINX, pass them along to the PHP parser, then return the responses back to NGINX. That's the same job mod_php does for Apache and what PHP-FPM (essentially) does for servers like NGINX.

You can see the PHP configuration here:

http://unit.nginx.org/docs-configuration.html#php-applicatio...

And here's the configuration needed to integrate Unit with NGINX:

http://unit.nginx.org/docs-integration-with-nginx.html

1 comments

Update:

Upon first reading I thought that Unit needed to be behind NGINX to function. When actually it listens for requests as a separate server, entirely. It only provides an API for configuration purposes.

However, If you want to use the other features of NGINX, like providing static files, you will need to put it in front of Unit.