Created
June 28, 2012 11:10
-
-
Save croxton/3010717 to your computer and use it in GitHub Desktop.
Apache config for VPS with 2Gb Ram running nginx as a reverse proxy for static files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| My Apache config for a VPS with 2Gb Ram and the following: | |
| * CentOS | |
| * cPanel | |
| * nginx as a reverse proxy for static files | |
| * APC opcode caching for PHP | |
| min spare servers 2 | |
| max spare servers 5 | |
| - should be roughly double min spare servers | |
| start servers 2 | |
| - should be same as min spare servers | |
| server limit 50 | |
| - 20Mb-30Mb per process so 50x30Mb=1500Mb or 75% of ram; go higher if you dare | |
| max clients 50 | |
| - same as server limit | |
| max requests per child 500 | |
| - ~10x the max clients. Ideally should be much higher (up to 5000) but experiment - higher means more chance of memory leaks - (depends on your linux flavour if Apache leaks memory). |
Because my apache is crashing under flood get request attack and Im assuming it's because of no memory and values were very high by default, can i prevent apache from crashing?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this suitable for server with about 50 sites having 2GB ram memory.
I hope it won't drop any requests?