| 122 | [[Image(hssr-php-2-cgi.jpg)]] |
| 123 | |
| 124 | This setup is very flexible. There are different webserver modules which implement FastCGI interface. Also PHP has build-in support of this interface. In general this is best setup which provide great flexibility and speed, but the setup can be a bit tricky. It can be run under any user, so it can be run under webserver user(nobody or apache as usual) or under specific user. |
| 125 | |
| 126 | It maybe complicated situation with opcode cache PHP extensions, if there are many process under different users are running, in this case each user will have own opcode cache, it means more security from one side, but high memory usage from another side. |
| 127 | |
| 128 | __Advantages:__ |
| 129 | * flexibility |
| 130 | * speed |
| 131 | * security (if properly configured) |
| 132 | * opcode cache extensions support |
| 133 | * enabled by default since PHP 5.3 |
| 134 | |
| 135 | __Disadvantages:__ |
| 136 | * since there are a lot of ways to implement this setup, it may be difficult to tune it up for the specific situation. |
| 137 | * it maybe high memory usage with opcode cache extensions if there are several PHP processes under different users. |
| 138 | |
| 139 | __Conclusion:__ This is a best option in most situations. Just check how your site is functioning, maybe some things can be changed to increase speed and/or security of your site. |
| 140 | |