Skip to content

Instantly share code, notes, and snippets.

@kamwing
Forked from kenzie/craft.conf
Created August 28, 2013 07:34
Show Gist options
  • Save kamwing/6363125 to your computer and use it in GitHub Desktop.
Save kamwing/6363125 to your computer and use it in GitHub Desktop.
server {
listen 80;
root /var/www/craft.dev/public;
index index.php index.html index.htm;
server_name craft.dev;
location / {
try_files $uri $uri/ @rewrites;
}
location @rewrites {
rewrite ^(.*) /index.php?p=$1 last;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
error_page 404 /index.php;
}
<?php
/**
* General Configuration
*
* All of your system's general configuration settings go in here.
* You can see a list of the default settings in craft/app/etc/config/defaults/general.php
*/
return array(
/**
* Whether generated URLs should be formatted using PATH_INFO, e.g. http://domain.com/index.php/path/,
* as opposed to using the query string, e.g. http://domain.com/index.php?p=path
*
* Possible values: true, false, 'auto'
*/
'usePathInfo' => true
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment