This file contains 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
server { | |
# we want to listen on port 80 on all IPs on our system - both IPv4 and IPv6 | |
listen [::]:80; | |
# our primary server name is the first, aliases simply come after it. you can also include wildcards like *.example.com | |
server_name blog.chrismeller.com new.chrismeller.com; | |
# where are our site files stored? | |
root /media/www/public_html/blog.chrismeller.com/public; | |
# define our access and error logs for this vhost |
This file contains 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
client_max_body_size 32m; |
This file contains 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
upstream php { | |
server unix:/var/run/php5-fpm.socket; | |
} | |
# make sure index.php is first in all our vhosts | |
index index.php index.html index.htm; |
This file contains 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
# we want to enable ssl session resumption to avoid | |
# having to start the handshake from scratch each page load | |
# so first we enable a shared cache, named SSL (creative!) that is 10mb large | |
ssl_session_cache shared:SSL:10m; | |
# save things in the cache for 3 minutes | |
# if you're not making a request at least every 3 minutes, this isn't going | |
# to accomplish anything anyway | |
ssl_session_timeout 3m; |
This file contains 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
# most people include something like this. don't. | |
# check your default nginx.conf, it's already covered in a much better way. | |
#gzip_disable "MSIE [1-6]\.(?!.*SV1)"; | |
# compress proxied requests too. | |
# it doesn't actually matter if the request is proxied, we still want it compressed. | |
gzip_proxied any; | |
# a pretty comprehensive list of content mime types that we want to compress | |
# there's a lot of repetition here because different applications might use different |
This file contains 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
expires max; |
This file contains 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
charset utf-8; |
This file contains 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
[www] | |
pm.status_path = /status |
This file contains 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
[www] | |
listen = /var/run/php5-fpm.socket |
This file contains 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
[www] | |
; at any time, there can be no more than 5 child processes | |
; if you know how much memory each process consumes regularly | |
; and how much free memory you have on your system, this is how | |
; you set a "hard limit" on the amount of memory php-fpm will be able to consume | |
pm.max_children = 5 | |
; when php-fpm first starts, how many processes should | |
; it immediately generate to handle requests? | |
; when you restart php-fpm, there may be an influx of requests. |