Skip to content

Instantly share code, notes, and snippets.

@clifgriffin
Last active August 17, 2017 18:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clifgriffin/c72efa606656e91e55af to your computer and use it in GitHub Desktop.
Save clifgriffin/c72efa606656e91e55af to your computer and use it in GitHub Desktop.
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:12345;
# Prevent arbitrary code execution by third parties with
# try_files directive.
# http://wiki.nginx.org/Pitfalls#Passing_Uncontrolled_Requests_to_PHP
try_files $uri =404;
location ~ /wp-admin {
include fastcgi_params;
fastcgi_keep_conn on;
fastcgi_pass 127.0.0.1:9000;
try_files $uri =404;
}
}
@pmgllc
Copy link

pmgllc commented Apr 17, 2015

How did you come up with the actual value for 12345 in the first fastcgi_pass? I can't find anything in any tut that says anything except 9000, which you have second.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment