Skip to content

Instantly share code, notes, and snippets.

@justindmartin
Created October 7, 2013 14:20
Show Gist options
  • Save justindmartin/6868801 to your computer and use it in GitHub Desktop.
Save justindmartin/6868801 to your computer and use it in GitHub Desktop.
Getting started Nginx configuration for Ron.
server {
listen 80;
root #replace this with the default full path to where all of your PHP files are;
index home;
server_name www.jumalabs.com #change to desired name, such as flipquiz.jumalabs.com;
location / {
rewrite ^/(.*)$ /index.php?url=$1 break;
# First attempt to serve request as file, then
# as directory, then fall back to index.html
try_files $uri $uri/ /index.html;
# With php5-cgi alone:
# With php5-fpm:
#the unix:/ part will be something different in Windows
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location /public {
root #replace this with the default full path to where all of your PHP files are;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment