jtolj
5/1/2013 - 7:37 PM

nginx_config.txt

server {
        listen 80;
        root /home/www/tge-studio.com/public_html;
        index index.php index.html index.htm;
 
        server_name tge-studio.com www.tge-studio.com;
 
        location / {
                try_files $uri $uri/ /index.php?q=$uri&$args;
		            autoindex on;
        }
 
        error_page 404 /404.html;
 
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
              root /usr/share/nginx/www;
        }
        
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        location ~ \.php$ {
                #fastcgi_pass 127.0.0.1:9000;
                # With php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
                
        }
        
        # BEGIN W3TC Browser Cache
        gzip on;
        gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon;
        location ~ \.(css|htc|js|js2|js3|js4)$ {
            expires 31536000s;
            add_header Pragma "public";
            add_header Cache-Control "max-age=31536000, public";
        }
        location ~ \.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml)$ {
            expires 3600s;
            add_header Pragma "public";
            add_header Cache-Control "max-age=3600, public";
            try_files $uri $uri/ $uri.html /index.php?$args;
        }
        location ~ \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ {
            expires 31536000s;
            add_header Pragma "public";
            add_header Cache-Control "max-age=31536000, public";
        }
}