{"action":"created","comment":{"url":"https://api.github.com/repos/linode/docs/pulls/comments/34614974","id":34614974,"diff_hunk":"@@ -0,0 +1,165 @@\n+High performance Nginx and PHP over Debian 8\n+19th May 2015 by Javier Briz\n+\n+\n+This document describes how to install and setup an nginx server with PHP-FPM.\n+This stack, together with a MySQL server, is what is called a **LEMP** server. After following this article, your PHP code will be\n+able to connect to a MySQL server, but the MySQL server installation itself will not be explained;\n+there are already [lots of guides](https://www.linode.com/docs/databases/mysql/) on this topic. \n+\n+#Installation Prerequisites\n+First of all, follow the [Getting Started Guide](https://www.linode.com/docs/getting-started/).\n+It is also usefull to have a Fully Qualified Domain Name to have a handy pointer to the server.\n+\n+#Packages installation\n+In this step, we are installing all the necessary packages.\n+Run the following as root to install nginx, PHP and MySQL connector:\n+\n+        apt-get update\n+        apt-get install nginx php5-fpm php5-mysql\n+\n+Make sure nginx and PHP-FPM are running\n+\n+        ps aux|grep -e nginx -e php\n+        \n+#Nginx setup\n+Now we have to setup nginx server to relay on PHP-FPM for PHP requests. \n+By default, PHP-FPM on debian listens on a socket. We are putting everything in one single server so this is ok.\n+To find the path for the socket run:\n+\n+        cat /etc/php5/fpm/pool.d/www.conf |grep 'listen ='\n+\n+Probably, it is located in `/var/run/php5-fpm.sock`\n+\n+We will tell nginx where is this socket in a *server* context in the nginx setup.\n+In other words, add following lines to `/etc/nginx/sites-enabled/default`, below start of *server* section:","path":"docs/websites/nginx/nginx-php-fpm-debian-8.md","position":35,"original_position":35,"commit_id":"8d6218c35c554c8fe25260b6b6a14d73d906775f","original_commit_id":"8d6218c35c554c8fe25260b6b6a14d73d906775f","user":{"login":"FelicianoTech","id":6017470,"avatar_url":"https://avatars.githubusercontent.com/u/6017470?v=3","gravatar_id":"","url":"https://api.github.com/users/FelicianoTech","html_url":"https://github.com/FelicianoTech","followers_url":"https://api.github.com/users/FelicianoTech/followers","following_url":"https://api.github.com/users/FelicianoTech/following{/other_user}","gists_url":"https://api.github.com/users/FelicianoTech/gists{/gist_id}","starred_url":"https://api.github.com/users/FelicianoTech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FelicianoTech/subscriptions","organizations_url":"https://api.github.com/users/FelicianoTech/orgs","repos_url":"https://api.github.com/users/FelicianoTech/repos","events_url":"https://api.github.com/users/FelicianoTech/events{/privacy}","received_events_url":"https://api.github.com/users/FelicianoTech/received_events","type":"User","site_admin":false},"body":"More clarification on where to put the location block is needed here. Either by mentioning line numbers, or showing a small snippet of what would come before and after where this block needs to be placed.","created_at":"2015-07-14T20:26:35Z","updated_at":"2015-07-14T20:26:35Z","html_url":"https://github.com/linode/docs/pull/230#discussion_r34614974","pull_request_url":"https://api.github.com/repos/linode/docs/pulls/230","_links":{"self":{"href":"https://api.github.com/repos/linode/docs/pulls/comments/34614974"},"html":{"href":"https://github.com/linode/docs/pull/230#discussion_r34614974"},"pull_request":{"href":"https://api.github.com/repos/linode/docs/pulls/230"}}},"pull_request":{"url":"https://api.github.com/repos/linode/docs/pulls/230","id":35822303,"html_url":"https://github.com/linode/docs/pull/230","diff_url":"https://github.com/linode/docs/pull/230.diff","patch_url":"https://github.com/linode/docs/pull/230.patch","issue_url":"https://api.github.com/repos/linode/docs/issues/230","number":230,"state":"open","locked":false,"title":"High Performance Nginx and PHP with Debian 8","user":{"login":"thetechstewart","id":2175369,"avatar_url":"https://avatars.githubusercontent.com/u/2175369?v=3","gravatar_id":"","url":"https://api.github.com/users/thetechstewart","html_url":"https://github.com/thetechstewart","followers_url":"https://api.github.com/users/thetechstewart/followers","following_url":"https://api.github.com/users/thetechstewart/following{/other_user}","gists_url":"https://api.github.com/users/thetechstewart/gists{/gist_id}","starred_url":"https://api.github.com/users/thetechstewart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thetechstewart/subscriptions","organizations_url":"https://api.github.com/users/thetechstewart/orgs","repos_url":"https://api.github.com/users/thetechstewart/repos","events_url":"https://api.github.com/users/thetechstewart/events{/privacy}","received_events_url":"https://api.github.com/users/thetechstewart/received_events","type":"User","site_admin":false},"body":"This is an import from a submission given to us via email. It has not yet been reviewed for technical accuracy or edited for for proper formatting. It's purpose here is to gauge interest from the community on this subject, and solicit independent review of the contents.","created_at":"2015-05-20T11:32:31Z","updated_at":"2015-07-14T20:26:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"352db8f48679f2b2e1faae0f17fe0e3f84dc95f3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/linode/docs/pulls/230/commits","review_comments_url":"https://api.github.com/repos/linode/docs/pulls/230/comments","review_comment_url":"https://api.github.com/repos/linode/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linode/docs/issues/230/comments","statuses_url":"https://api.github.com/repos/linode/docs/statuses/8d6218c35c554c8fe25260b6b6a14d73d906775f","head":{"label":"thetechstewart:bounty-hiperfnginx","ref":"bounty-hiperfnginx","sha":"8d6218c35c554c8fe25260b6b6a14d73d906775f","user":{"login":"thetechstewart","id":2175369,"avatar_url":"https://avatars.githubusercontent.com/u/2175369?v=3","gravatar_id":"","url":"https://api.github.com/users/thetechstewart","html_url":"https://github.com/thetechstewart","followers_url":"https://api.github.com/users/thetechstewart/followers","following_url":"https://api.github.com/users/thetechstewart/following{/other_user}","gists_url":"https://api.github.com/users/thetechstewart/gists{/gist_id}","starred_url":"https://api.github.com/users/thetechstewart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thetechstewart/subscriptions","organizations_url":"https://api.github.com/users/thetechstewart/orgs","repos_url":"https://api.github.com/users/thetechstewart/repos","events_url":"https://api.github.com/users/thetechstewart/events{/privacy}","received_events_url":"https://api.github.com/users/thetechstewart/received_events","type":"User","site_admin":false},"repo":{"id":23120424,"name":"docs","full_name":"thetechstewart/docs","owner":{"login":"thetechstewart","id":2175369,"avatar_url":"https://avatars.githubusercontent.com/u/2175369?v=3","gravatar_id":"","url":"https://api.github.com/users/thetechstewart","html_url":"https://github.com/thetechstewart","followers_url":"https://api.github.com/users/thetechstewart/followers","following_url":"https://api.github.com/users/thetechstewart/following{/other_user}","gists_url":"https://api.github.com/users/thetechstewart/gists{/gist_id}","starred_url":"https://api.github.com/users/thetechstewart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thetechstewart/subscriptions","organizations_url":"https://api.github.com/users/thetechstewart/orgs","repos_url":"https://api.github.com/users/thetechstewart/repos","events_url":"https://api.github.com/users/thetechstewart/events{/privacy}","received_events_url":"https://api.github.com/users/thetechstewart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thetechstewart/docs","description":"Linode guides and tutorials.","fork":true,"url":"https://api.github.com/repos/thetechstewart/docs","forks_url":"https://api.github.com/repos/thetechstewart/docs/forks","keys_url":"https://api.github.com/repos/thetechstewart/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thetechstewart/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thetechstewart/docs/teams","hooks_url":"https://api.github.com/repos/thetechstewart/docs/hooks","issue_events_url":"https://api.github.com/repos/thetechstewart/docs/issues/events{/number}","events_url":"https://api.github.com/repos/thetechstewart/docs/events","assignees_url":"https://api.github.com/repos/thetechstewart/docs/assignees{/user}","branches_url":"https://api.github.com/repos/thetechstewart/docs/branches{/branch}","tags_url":"https://api.github.com/repos/thetechstewart/docs/tags","blobs_url":"https://api.github.com/repos/thetechstewart/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thetechstewart/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thetechstewart/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/thetechstewart/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thetechstewart/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/thetechstewart/docs/languages","stargazers_url":"https://api.github.com/repos/thetechstewart/docs/stargazers","contributors_url":"https://api.github.com/repos/thetechstewart/docs/contributors","subscribers_url":"https://api.github.com/repos/thetechstewart/docs/subscribers","subscription_url":"https://api.github.com/repos/thetechstewart/docs/subscription","commits_url":"https://api.github.com/repos/thetechstewart/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/thetechstewart/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/thetechstewart/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/thetechstewart/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/thetechstewart/docs/contents/{+path}","compare_url":"https://api.github.com/repos/thetechstewart/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thetechstewart/docs/merges","archive_url":"https://api.github.com/repos/thetechstewart/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thetechstewart/docs/downloads","issues_url":"https://api.github.com/repos/thetechstewart/docs/issues{/number}","pulls_url":"https://api.github.com/repos/thetechstewart/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/thetechstewart/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/thetechstewart/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thetechstewart/docs/labels{/name}","releases_url":"https://api.github.com/repos/thetechstewart/docs/releases{/id}","created_at":"2014-08-19T18:06:27Z","updated_at":"2014-08-19T11:24:54Z","pushed_at":"2015-07-14T18:58:18Z","git_url":"git://github.com/thetechstewart/docs.git","ssh_url":"git@github.com:thetechstewart/docs.git","clone_url":"https://github.com/thetechstewart/docs.git","svn_url":"https://github.com/thetechstewart/docs","homepage":"https://www.linode.com/docs/","size":83733,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"linode:master","ref":"master","sha":"724e8f171876ea4a9042da5efa0ea8ff4d065411","user":{"login":"linode","id":5184305,"avatar_url":"https://avatars.githubusercontent.com/u/5184305?v=3","gravatar_id":"","url":"https://api.github.com/users/linode","html_url":"https://github.com/linode","followers_url":"https://api.github.com/users/linode/followers","following_url":"https://api.github.com/users/linode/following{/other_user}","gists_url":"https://api.github.com/users/linode/gists{/gist_id}","starred_url":"https://api.github.com/users/linode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linode/subscriptions","organizations_url":"https://api.github.com/users/linode/orgs","repos_url":"https://api.github.com/users/linode/repos","events_url":"https://api.github.com/users/linode/events{/privacy}","received_events_url":"https://api.github.com/users/linode/received_events","type":"Organization","site_admin":false},"repo":{"id":22214885,"name":"docs","full_name":"linode/docs","owner":{"login":"linode","id":5184305,"avatar_url":"https://avatars.githubusercontent.com/u/5184305?v=3","gravatar_id":"","url":"https://api.github.com/users/linode","html_url":"https://github.com/linode","followers_url":"https://api.github.com/users/linode/followers","following_url":"https://api.github.com/users/linode/following{/other_user}","gists_url":"https://api.github.com/users/linode/gists{/gist_id}","starred_url":"https://api.github.com/users/linode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linode/subscriptions","organizations_url":"https://api.github.com/users/linode/orgs","repos_url":"https://api.github.com/users/linode/repos","events_url":"https://api.github.com/users/linode/events{/privacy}","received_events_url":"https://api.github.com/users/linode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linode/docs","description":"Linode guides and tutorials.","fork":false,"url":"https://api.github.com/repos/linode/docs","forks_url":"https://api.github.com/repos/linode/docs/forks","keys_url":"https://api.github.com/repos/linode/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linode/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linode/docs/teams","hooks_url":"https://api.github.com/repos/linode/docs/hooks","issue_events_url":"https://api.github.com/repos/linode/docs/issues/events{/number}","events_url":"https://api.github.com/repos/linode/docs/events","assignees_url":"https://api.github.com/repos/linode/docs/assignees{/user}","branches_url":"https://api.github.com/repos/linode/docs/branches{/branch}","tags_url":"https://api.github.com/repos/linode/docs/tags","blobs_url":"https://api.github.com/repos/linode/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linode/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linode/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/linode/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linode/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/linode/docs/languages","stargazers_url":"https://api.github.com/repos/linode/docs/stargazers","contributors_url":"https://api.github.com/repos/linode/docs/contributors","subscribers_url":"https://api.github.com/repos/linode/docs/subscribers","subscription_url":"https://api.github.com/repos/linode/docs/subscription","commits_url":"https://api.github.com/repos/linode/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/linode/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/linode/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/linode/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/linode/docs/contents/{+path}","compare_url":"https://api.github.com/repos/linode/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linode/docs/merges","archive_url":"https://api.github.com/repos/linode/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linode/docs/downloads","issues_url":"https://api.github.com/repos/linode/docs/issues{/number}","pulls_url":"https://api.github.com/repos/linode/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/linode/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/linode/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linode/docs/labels{/name}","releases_url":"https://api.github.com/repos/linode/docs/releases{/id}","created_at":"2014-07-24T13:57:47Z","updated_at":"2015-07-10T03:04:25Z","pushed_at":"2015-07-14T18:58:18Z","git_url":"git://github.com/linode/docs.git","ssh_url":"git@github.com:linode/docs.git","clone_url":"https://github.com/linode/docs.git","svn_url":"https://github.com/linode/docs","homepage":"https://www.linode.com/docs/","size":92871,"stargazers_count":251,"watchers_count":251,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":174,"mirror_url":null,"open_issues_count":19,"forks":174,"open_issues":19,"watchers":251,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linode/docs/pulls/230"},"html":{"href":"https://github.com/linode/docs/pull/230"},"issue":{"href":"https://api.github.com/repos/linode/docs/issues/230"},"comments":{"href":"https://api.github.com/repos/linode/docs/issues/230/comments"},"review_comments":{"href":"https://api.github.com/repos/linode/docs/pulls/230/comments"},"review_comment":{"href":"https://api.github.com/repos/linode/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linode/docs/pulls/230/commits"},"statuses":{"href":"https://api.github.com/repos/linode/docs/statuses/8d6218c35c554c8fe25260b6b6a14d73d906775f"}}}}