Skip to content

Instantly share code, notes, and snippets.

@nramsbottom
Created August 12, 2014 13:01
Show Gist options
  • Select an option

  • Save nramsbottom/f5c376bb7a6d70bf0f85 to your computer and use it in GitHub Desktop.

Select an option

Save nramsbottom/f5c376bb7a6d70bf0f85 to your computer and use it in GitHub Desktop.
# basic example configuration for nginx with php-fpm
server {
root /usr/share/nginx/www;
index index.html index.htm;
server_name localhost;
location /app1 {
alias /usr/share/nginx/apps/app1;
}
location /app2 {
alias /usr/share/nginx/apps/app2;
}
location /app3 {
index index.php;
alias /usr/share/nginx/apps/app3;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
location / {
try_files $uri $uri/ /index.html;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
} # end-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment