Nginx 1.0.0 is out!

I just happened to check the Nginx website today and discovered that version 1.0.0 stable has been released! I immediately downloaded it and updated my web server. So far so good, I’m currently rebuilding my Nginx conf files for my various sites. I learned a decent amount about Nginx configs this week and thought I’d take some time to show how my configs work. The config below is very basic and I just threw it together quickly

server {
    server_name	*;
    rewrite ^ $scheme://$request_uri permanent;

server {


    charset utf-8;

    root	/home/;
    index	index.php;

    error_log /path-to-logs/;

    keepalive_timeout    70;

    location / {
            try_files $uri $uri/ @rewrite;

    location ~ /wp-content/(.*).php$ {
        deny all;

    # pass the PHP scripts to FastCGI server listening on
    location ~ (/index|wp-(.*)|/wp-admin/(.*)).php$ {
	access_log /path-to-logs/;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        /usr/local/nginx/conf/fastcgi_params;
    location @rewrite {
	 rewrite ^/(.*)$ /index.php?q=$request_uri;
    location ~ .php$ {
	deny all;

I save these conf files in their own folder and load them into Nginx by adding the following to my /usr/local/nginx/conf/nginx.conf inside the http{} section.

        include /path-to-confs/*.conf;

Leave a Reply

Your email address will not be published. Required fields are marked *