Skip to content

Instantly share code, notes, and snippets.

@rkasigi
Last active September 7, 2017 04:09
Show Gist options
  • Save rkasigi/06292ac3009e4b693713a2e110c30607 to your computer and use it in GitHub Desktop.
Save rkasigi/06292ac3009e4b693713a2e110c30607 to your computer and use it in GitHub Desktop.
nginx alias with php-fpm
location /alias-name {
alias /data/path-alias-name;
location ~ \.php$ {
fastcgi_split_path_info ^(.+?\.php)(/.*)?$;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment