![]() |
nginx config help (getting started)
Hi, im just migrating my server to a P3, 2Gb RAM, 500Gb HD. I just became interested on the benefits of nginx/php-fpm over apache and im trying to move to this environment from a FreeBSD/Apache setup
my site has almost 300 users online on top hour... 4K visits/day 400K page views/day 1M hits/day 4Gb transfered/day i need some exmaple config files of a working site or an optimized config, since im an apache/mod_php guy im reaaaaly lost here... thanks! |
you can try this
nginx.conf events { worker_connections 6000; } worker_processes 12; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 10; gzip on; gzip_comp_level 2; gzip_proxied any; gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; php-fpm.conf <value name="max_children">3000</value> <value name="StartServers">200</value> <value name="MinSpareServers">600</value> <value name="MaxSpareServers">2000</value> <value name="request_terminate_timeout">10s</value> |
good, thanks!!! :D
|
With 300 people online at your peak time, there is no reason to start nginx or php-fpm with that many connections, there is no way you will use them, they are also going to use resources better spent in other places.
Start them off with their default connection limits in place, consider raising them if your traffic increases. You should adjust these values based on your sites traffic & content, NOT by what others are using, these values should reflect your needs. Basic optimized configuration: Code:
client_header_timeout 10m; With 2500 online: Code:
nginx.conf Code:
nginx.conf |
Quote:
Without any usage datas and building a configuration upon these matching exactly the needs there won't be much speedup by changing some software. ;) |
thank you very much snakes1100 , i will definitely go to try to use something from that info!!!
Angel-Wings: im not sure, but if i dont try how do i know if its better? Yet, my new hardware is a bit smaller, so i think this will be an improvement some how, i lost a bit on hardware now, but i also migrate to a lighter software about my usage data, what do you ask specifically? i obviously wont just copy/paste the examples posted here, since everyone has different needs, but i needed a starting base :) |
As per this forums Forum & Server Management posting guidelines this question should have been asked on vBulletin.com:
Quote:
|
thanks Marco, im actually interested on real work config examples, not sure if support also has own boards with vb and different environments :)
|
Both Eva2000 (official support) and other users may respond in that forum. Eva2000 (George) is very experienced in running many different environments.
Bottom line is that it is better to have such specialized information in a single place. |
All times are GMT. The time now is 11:33 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|