{"id":346,"date":"2010-02-17T21:55:46","date_gmt":"2010-02-17T16:10:46","guid":{"rendered":"http:\/\/www.sparksupport.com\/blog\/?p=346"},"modified":"2024-06-26T12:12:10","modified_gmt":"2024-06-26T12:12:10","slug":"installing-nginx-with-php-fpm-on-a-linux-server","status":"publish","type":"post","link":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/","title":{"rendered":"Installing Nginx with PHP-FPM on a Linux server"},"content":{"rendered":"<p>Nginx (pronounced as Engine-x) is a high performance web server,reverse proxy, mail proxy server which was originally written by Igor Sysoev in 2005. Here we discuss about setting up a very basic Installing Nginx web server on your Linux server , capable of parsing <a href=\"https:\/\/www.sparksupport.com\/hire-php-programmer-india\">php pages<\/a>.<\/p>\n<h3><strong>Installing Nginx on your Linux server<\/strong><\/h3>\n<p>Installing nginx on your Linux server is very simple and even on the first try itself, you will not face any difficulties.<\/p>\n<p>The steps that i have followed on my first nginx installation are given bellow (of course with the help of others tutorials and other resources available from net)<\/p>\n<p>[bash]<\/p>\n<p>#(Change directory to \/usr\/local\/src [ its a good practice to download and compile software&#8217;s from \/usr\/local\/src ] )<br \/>\ncd \/usr\/local\/src<\/p>\n<p>#(download nginx source from &#8220;nginx.org&#8221;)<br \/>\nwget http:\/\/nginx.org\/download\/nginx-0.8.33.tar.gz<\/p>\n<p>#(Extract the source file )<br \/>\ntar -xzf nginx-0.8.33.tar.gz<br \/>\ncd nginx-0.8.33<\/p>\n<p>#Now configure Nginx , here we are using the 2 basic configuration options<br \/>\n[ &#8211;sbin-path=\/usr\/local\/sbin #the nginx binary path ]<br \/>\n[ &#8211;with-http_ssl_module #Enables https module ]<\/p>\n<p>.\/configure &#8211;sbin-path=\/usr\/local\/sbin &#8211;with-http_ssl_module<\/p>\n<p>[\/bash]<\/p>\n<p>since you have included the &#8211;with-http_ssl_module there is a possibility of getting the following error ( at least i got this error on a fresh centos machine since no pcre libraries were pre-installed on the system)<\/p>\n<p>[text]<br \/>\nchecking for PCRE library in \/usr\/include\/pcre\/ &#8230; not found<\/p>\n<p>checking for PCRE library in \/usr\/pkg\/ &#8230; not found<\/p>\n<p>checking for PCRE library in \/opt\/local\/ &#8230; not found<\/p>\n<p>.\/configure: error: the HTTP rewrite module requires the PCRE library.<\/p>\n<p>You can either disable the module by using &#8211;without-http_rewrite_module<\/p>\n<p>option, or install the PCRE library into the system, or build the PCRE library<\/p>\n<p>statically from the source with nginx by using &#8211;with-pcre=<br \/>\noption.<br \/>\n[\/text]<\/p>\n<p>If you get the above error while configuring nginx , please download pcre (Perl Compatible Regular Expressions) from &#8220;http:\/\/www.pcre.org\/&#8221; and change the nginx configure command as given bellow<\/p>\n<p><!--more--><\/p>\n<p>[bash]<\/p>\n<p>cd \/usr\/local\/src<\/p>\n<p>#(Download the pcre source file)<br \/>\nwget ftp:\/\/ftp.csx.cam.ac.uk\/pub\/software\/programming\/pcre\/pcre-7.9.tar.bz2<\/p>\n<p>#(extract the file)<br \/>\ntar -xjf pcre-7.9.tar.bz2<\/p>\n<p>cd \/usr\/local\/src\/nginx-0.8.33<\/p>\n<p>[\/bash]<\/p>\n<p>Now configure nginx again with the following configuration options<\/p>\n<p>[bash]<br \/>\n.\/configure &#8211;sbin-path=\/usr\/local\/sbin &#8211;with-http_ssl_module &#8211;with-pcre=\/usr\/local\/src\/pcre-7.9<br \/>\n[\/bash]<\/p>\n<p>The nginx configuration should now be completed with out any errors, now install nginx<\/p>\n<p>[bash]<br \/>\nmake<\/p>\n<p>make install<br \/>\n[\/bash]<\/p>\n<p>Nginx is now installed on your machine and you can start the nginx process using the<\/p>\n<p>[bash]<br \/>\n#[ usually nginx will be started automatically at this stage]<br \/>\n\/usr\/local\/sbin\/nginx<br \/>\n[\/bash]<\/p>\n<p>and to stop nginx , you can use the following command<\/p>\n<p>[bash]<br \/>\npkill -9 nginx<br \/>\n[\/bash]<\/p>\n<p>If you want to use a daemon for starting and stopping nginx like we are doing in apache , please copy the following script and save this as &#8220;\/etc\/init.d\/nginx<\/p>\n<p>[bash]<br \/>\n!\/bin\/sh<\/p>\n<p># nginx &#8211; this script starts and stops the nginx daemin<\/p>\n<p>#chkconfig: &#8211; 85 15<br \/>\n#description: Nginx is an HTTP(S) server, HTTP(S) reverse \\<br \/>\nproxy and IMAP\/POP3 proxy server<br \/>\n#processname: nginx<br \/>\n#config: \/usr\/local\/nginx\/conf\/nginx.conf<br \/>\n#pidfile: \/usr\/local\/nginx\/logs\/nginx.pid<\/p>\n<p>#Source function library.<br \/>\n. \/etc\/rc.d\/init.d\/functions<\/p>\n<p>#Source networking configuration.<br \/>\n. \/etc\/sysconfig\/network<\/p>\n<p>#Check that networking is up.<br \/>\n[ &#8220;$NETWORKING&#8221; = &#8220;no&#8221; ] &amp;amp;&amp;amp; exit 0<\/p>\n<p>nginx=&#8221;\/usr\/local\/sbin\/nginx&#8221;<br \/>\nprog=$(basename $nginx)<\/p>\n<p>NGINX_CONF_FILE=&#8221;\/usr\/local\/nginx\/conf\/nginx.conf&#8221;<\/p>\n<p>lockfile=\/var\/lock\/subsys\/nginx<\/p>\n<p>start() {<br \/>\n[ -x $nginx ] || exit 5<br \/>\n[ -f $NGINX_CONF_FILE ] || exit 6<br \/>\necho -n $&#8221;Starting $prog: &#8221;<br \/>\ndaemon $nginx -c $NGINX_CONF_FILE<br \/>\nretval=$?<br \/>\necho<br \/>\n[ $retval -eq 0 ] &amp;amp;&amp;amp; touch $lockfile<br \/>\nreturn $retval<br \/>\n}<\/p>\n<p>stop() {<br \/>\necho -n $&#8221;Stopping $prog: &#8221;<br \/>\nkillproc $prog -QUIT<br \/>\nretval=$?<br \/>\necho<br \/>\n[ $retval -eq 0 ] &amp;amp;&amp;amp; rm -f $lockfile<br \/>\nreturn $retval<br \/>\n}<\/p>\n<p>restart() {<br \/>\nconfigtest || return $?<br \/>\nstop<br \/>\nstart<br \/>\n}<\/p>\n<p>reload() {<br \/>\nconfigtest || return $?<br \/>\necho -n $&#8221;Reloading $prog: &#8221;<br \/>\nkillproc $nginx -HUP<br \/>\nRETVAL=$?<br \/>\necho<br \/>\n}<\/p>\n<p>force_reload() {<br \/>\nrestart<br \/>\n}<\/p>\n<p>configtest() {<br \/>\n$nginx -t -c $NGINX_CONF_FILE<br \/>\n}<\/p>\n<p>rh_status() {<br \/>\nstatus $prog<br \/>\n}<\/p>\n<p>rh_status_q() {<br \/>\nrh_status &amp;gt;\/dev\/null 2&amp;gt;&amp;amp;1<br \/>\n}<\/p>\n<p>case &#8220;$1&#8243; in<br \/>\nstart)<br \/>\nrh_status_q &amp;amp;&amp;amp; exit 0<br \/>\n$1<br \/>\n;;<br \/>\nstop)<br \/>\nrh_status_q || exit 0<br \/>\n$1<br \/>\n;;<br \/>\nrestart|configtest)<br \/>\n$1<br \/>\n;;<br \/>\nreload)<br \/>\nrh_status_q || exit 7<br \/>\n$1<br \/>\n;;<br \/>\nforce-reload)<br \/>\nforce_reload<br \/>\n;;<br \/>\nstatus)<br \/>\nrh_status<br \/>\n;;<br \/>\ncondrestart|try-restart)<br \/>\nrh_status_q || exit 0<br \/>\n;;<br \/>\n*)<br \/>\necho $&#8221;Usage: $0<br \/>\n{start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}&#8221;<br \/>\nexit 2<br \/>\nesac<br \/>\n[\/bash]<\/p>\n<p>You can also download the above script from our server using the following method<\/p>\n<p>[bash]<br \/>\nwget http:\/\/www.sparksupport.com\/nginx\/startupscript.txt -O \/etc\/init.d\/nginx<br \/>\n[\/bash]<\/p>\n<p>Which will download the file from our server and will save it to \/etc\/init.d\/nginx<\/p>\n<p>Change the file permission to 755<\/p>\n<p>[bash]<br \/>\nchmod 755 \/etc\/init.d\/nginx<br \/>\n[\/bash]<\/p>\n<p>Now you can use the downloaded and Installing Nginx daemon script to start and stop nginx server<\/p>\n<p>[bash]<br \/>\n\/etc\/init.d\/nginx start ( To start the web server)<\/p>\n<p>\/etc\/init.d\/nginx stop ( To stop the web server)<br \/>\n[\/bash]<\/p>\n<p>Now if you enter your server ip on the browser , you will see a page, which is the default page for nginx<\/p>\n<div><a href=\"http:\/\/www.sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/nginx_html1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-364 size-medium\" style=\"margin: 5px; border: 1px solid #ececec;\" src=\"http:\/\/www.sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/nginx_html1-300x141.jpg\" alt=\"Installing Nginx fig 1\" width=\"300\" height=\"141\" \/><\/a><\/div>\n<p>Now you need the nginx to parse php pages so that you can host your php pages on this nginx server ,for that we need to install a fastcgi process manager on our server<\/p>\n<h3><strong> <span style=\"text-decoration: underline;\"> PHP-FPM<\/span><\/strong><\/h3>\n<p>The typical nginx configuration involves using spawn-fcgi from the Lighttpd project to get nginx serving up PHP. There are a few issues with spawn-fcg like the spawn-fcgi hangs after a few hours. So here we will use the php-fpm (php fastcgi process manager) which is actually a set of patches to php for an alternative fastcgi-process manager which can be safely used in busy sites with out having the fear of hang issues or crash issues.<\/p>\n<p>More details about php-fpm can be found on &#8220;http:\/\/php-fpm.org\/&#8221;<\/p>\n<h3><strong> <span style=\"text-decoration: underline;\"> Installing PHP-FPM <\/span><\/strong><\/h3>\n<p>Download the php source from &#8220;http:\/\/php.net&#8221;<\/p>\n<p>[bash]<\/p>\n<p>cd \/usr\/local\/src<\/p>\n<p>wget http:\/\/museum.php.net\/php5\/php-5.2.8.tar.bz2 [here we are using php-5.2.8 , if you want to use higher versions of php , then you need to use the corresponding php-fpm version]<\/p>\n<p>tar -xjf php-5.2.8.tar.bz2<\/p>\n<p>Download the php-fpm package from &#8220;http:\/\/php-fpm.org\/&#8221;<\/p>\n<p>wget http:\/\/php-fpm.org\/downloads\/php-5.2.8-fpm-0.5.10.diff.gz<\/p>\n<p>gzip -cd php-5.2.8-fpm-0.5.10.diff.gz | sudo patch -d php-5.2.8 -p1 ( patching the php<br \/>\nsource )<\/p>\n<p>cd php-5.2.8<\/p>\n<p>configuring php<\/p>\n<p>.\/configure &#8211;enable-fastcgi &#8211;enable-fpm &#8211;with-mcrypt &#8211;enable-mbstring &#8211;with-<br \/>\nmysql=\/usr\/include \/mysql &#8211;with-mysql-sock=\/tmp\/mysql.sock &#8211;with-curl &#8211;with-sockets &#8211;with-gd &#8211;with-zlib &#8211;with-iconv &#8211;with-jpeg-dir=\/usr\/lib<\/p>\n<p>make<\/p>\n<p>make install<br \/>\n[\/bash]<\/p>\n<p>Now open the php-fpm.conf in your favourite text editior (here we use vi)<\/p>\n<p>[bash]<br \/>\nvi \/usr\/local\/etc\/php-fpm.conf<br \/>\n[\/bash]<\/p>\n<p>Search for &#8220;Unix group of processes&#8221; and &#8221; Unix user of processes&#8221; and add the user nobody as given bellow [by default nobody will be the user and group given in the conf, and you will only be required to un comment the following lines on the conf]<\/p>\n<p>[bash]<br \/>\nUnix user of processes<br \/>\nnobody<\/p>\n<p>Unix group of processes<br \/>\nnobody<br \/>\n[\/bash]<\/p>\n<p>please note that the nobody user is the nginx user mentioned in your nginx conf , please refer your nginx conf to verify this now go to your nginx default document root<\/p>\n<p>[bash]<br \/>\ncd \/usr\/local\/nginx\/html<br \/>\n[\/bash]<\/p>\n<p>now please create a phpinfo( ) page and save it as index.php<\/p>\n<p>now open the nginx.conf and add these lines to the configuration<\/p>\n<p>[bash]<\/p>\n<p>location ~ \\.php$ {<br \/>\nroot \/usr\/local\/nginx\/html; # The directory on which the php pages are placed<br \/>\nfastcgi_pass 127.0.0.1:9000;<br \/>\nfastcgi_index index.php;<br \/>\nfastcgi_param SCRIPT_FILENAME \/usr\/local\/nginx\/html$fastcgi_script_name;<br \/>\ninclude fastcgi_params;<br \/>\n}<br \/>\n[\/bash]<\/p>\n<p>Usually the above lines will be present in the nginx conf by default itself, you just need to un comment the above lines from your nginx conf .Also if you get a &#8220;NO INPUT&#8221; message on the browser , please make sure that the path given in the nginx conf(\/usr\/local\/nginx\/html), are correct. That is on the following 2 lines<\/p>\n<p>[bash]<br \/>\nroot \/usr\/local\/nginx\/html;<br \/>\nfastcgi_param SCRIPT_FILENAME \/usr\/local\/nginx\/html$fastcgi_script_name<br \/>\n[\/bash]<\/p>\n<p>now restart nginx and start php-fpm<\/p>\n<p>[bash]<br \/>\n\/etc\/init.d\/nginx restart<\/p>\n<p>php-fpm start<br \/>\n[\/bash]<\/p>\n<p>you can verify that your php-fpm is running by the following netstat command<\/p>\n<p>[bash]<br \/>\nnetstat -pant |grep 9000 \/\/the php-fpm runs on the port 9000 and from the nginx we transfer the request to this port internally<br \/>\n[\/bash]<\/p>\n<p>Now enter your ipaddres\/index.php on your browser<\/p>\n<p>[bash]<br \/>\nhttp:\/\/your-ip-address\/index.php<br \/>\nplease replace your-ip-address with your ip address<br \/>\n[\/bash]<\/p>\n<p>which will show the php info page like the one given bellow.<\/p>\n<div><a href=\"http:\/\/www.sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/nginx_php.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-365 size-medium\" src=\"http:\/\/www.sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/nginx_php-300x243.jpg\" alt=\"fig 2\" width=\"300\" height=\"243\" \/><\/a><\/div>\n<p>By following the above steps you will be able to setup a basic Installing Nginx web server that is capable of parsing php pages within few minutes<\/p>\n<p>If you face any difficulties in setting up an nginx server using the above methods , please let us know that<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nginx (pronounced as Engine-x) is a high performance web server,reverse proxy, mail proxy server which was originally written by Igor Sysoev in 2005. Here we<\/p>\n","protected":false},"author":10,"featured_media":5102,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6],"tags":[89,90],"class_list":["post-346","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-how-to-install-nginx-linux-server","tag-install-nginx-php-linux"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Installing Nginx with PHP-FPM on a Linux server - useful professional tips<\/title>\n<meta name=\"description\" content=\"Best approaches for Installing Nginx, setup tips for nginx differently depending on the operating system. complete Installing Nginx on your Linux server\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Installing Nginx with PHP-FPM on a Linux server - useful professional tips\" \/>\n<meta property=\"og:description\" content=\"Best approaches for Installing Nginx, setup tips for nginx differently depending on the operating system. complete Installing Nginx on your Linux server\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/\" \/>\n<meta property=\"article:published_time\" content=\"2010-02-17T16:10:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-26T12:12:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/4.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"766\" \/>\n\t<meta property=\"og:image:height\" content=\"307\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Vishnuprasad R\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vishnuprasad R\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/\"},\"author\":{\"name\":\"Vishnuprasad R\",\"@id\":\"https:\/\/sparksupport.com\/blog\/#\/schema\/person\/16b0667e1ca1f0b86b76efba4d8fb691\"},\"headline\":\"Installing Nginx with PHP-FPM on a Linux server\",\"datePublished\":\"2010-02-17T16:10:46+00:00\",\"dateModified\":\"2024-06-26T12:12:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/\"},\"wordCount\":1481,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/sparksupport.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/4.jpg\",\"keywords\":[\"how to install nginx linux server\",\"install nginx php linux\"],\"articleSection\":[\"linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/\",\"url\":\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/\",\"name\":\"Installing Nginx with PHP-FPM on a Linux server - useful professional tips\",\"isPartOf\":{\"@id\":\"https:\/\/sparksupport.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/4.jpg\",\"datePublished\":\"2010-02-17T16:10:46+00:00\",\"dateModified\":\"2024-06-26T12:12:10+00:00\",\"description\":\"Best approaches for Installing Nginx, setup tips for nginx differently depending on the operating system. complete Installing Nginx on your Linux server\",\"breadcrumb\":{\"@id\":\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#primaryimage\",\"url\":\"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/4.jpg\",\"contentUrl\":\"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/4.jpg\",\"width\":766,\"height\":307},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/sparksupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Installing Nginx with PHP-FPM on a Linux server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/sparksupport.com\/blog\/#website\",\"url\":\"https:\/\/sparksupport.com\/blog\/\",\"name\":\"SparkSupport Blog\",\"description\":\"SparkSupport Blogs\",\"publisher\":{\"@id\":\"https:\/\/sparksupport.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/sparksupport.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/sparksupport.com\/blog\/#organization\",\"name\":\"SparkSupport\",\"url\":\"https:\/\/sparksupport.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/sparksupport.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2019\/08\/cropped-logo-1.jpg\",\"contentUrl\":\"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2019\/08\/cropped-logo-1.jpg\",\"width\":216,\"height\":44,\"caption\":\"SparkSupport\"},\"image\":{\"@id\":\"https:\/\/sparksupport.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/sparksupport.com\/blog\/#\/schema\/person\/16b0667e1ca1f0b86b76efba4d8fb691\",\"name\":\"Vishnuprasad R\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/27e1772dd9b22580aea3d8b41a57418d2cd2ea18ce2a4d2254b28b0c0a32eb3e?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/27e1772dd9b22580aea3d8b41a57418d2cd2ea18ce2a4d2254b28b0c0a32eb3e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/27e1772dd9b22580aea3d8b41a57418d2cd2ea18ce2a4d2254b28b0c0a32eb3e?s=96&d=mm&r=g\",\"caption\":\"Vishnuprasad R\"},\"url\":\"https:\/\/sparksupport.com\/blog\/author\/vishnu\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Installing Nginx with PHP-FPM on a Linux server - useful professional tips","description":"Best approaches for Installing Nginx, setup tips for nginx differently depending on the operating system. complete Installing Nginx on your Linux server","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/","og_locale":"en_US","og_type":"article","og_title":"Installing Nginx with PHP-FPM on a Linux server - useful professional tips","og_description":"Best approaches for Installing Nginx, setup tips for nginx differently depending on the operating system. complete Installing Nginx on your Linux server","og_url":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/","article_published_time":"2010-02-17T16:10:46+00:00","article_modified_time":"2024-06-26T12:12:10+00:00","og_image":[{"width":766,"height":307,"url":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/4.jpg","type":"image\/jpeg"}],"author":"Vishnuprasad R","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Vishnuprasad R","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#article","isPartOf":{"@id":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/"},"author":{"name":"Vishnuprasad R","@id":"https:\/\/sparksupport.com\/blog\/#\/schema\/person\/16b0667e1ca1f0b86b76efba4d8fb691"},"headline":"Installing Nginx with PHP-FPM on a Linux server","datePublished":"2010-02-17T16:10:46+00:00","dateModified":"2024-06-26T12:12:10+00:00","mainEntityOfPage":{"@id":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/"},"wordCount":1481,"commentCount":0,"publisher":{"@id":"https:\/\/sparksupport.com\/blog\/#organization"},"image":{"@id":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#primaryimage"},"thumbnailUrl":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/4.jpg","keywords":["how to install nginx linux server","install nginx php linux"],"articleSection":["linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/","url":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/","name":"Installing Nginx with PHP-FPM on a Linux server - useful professional tips","isPartOf":{"@id":"https:\/\/sparksupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#primaryimage"},"image":{"@id":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#primaryimage"},"thumbnailUrl":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/4.jpg","datePublished":"2010-02-17T16:10:46+00:00","dateModified":"2024-06-26T12:12:10+00:00","description":"Best approaches for Installing Nginx, setup tips for nginx differently depending on the operating system. complete Installing Nginx on your Linux server","breadcrumb":{"@id":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#primaryimage","url":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/4.jpg","contentUrl":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2010\/02\/4.jpg","width":766,"height":307},{"@type":"BreadcrumbList","@id":"https:\/\/sparksupport.com\/blog\/installing-nginx-with-php-fpm-on-a-linux-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sparksupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Installing Nginx with PHP-FPM on a Linux server"}]},{"@type":"WebSite","@id":"https:\/\/sparksupport.com\/blog\/#website","url":"https:\/\/sparksupport.com\/blog\/","name":"SparkSupport Blog","description":"SparkSupport Blogs","publisher":{"@id":"https:\/\/sparksupport.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sparksupport.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/sparksupport.com\/blog\/#organization","name":"SparkSupport","url":"https:\/\/sparksupport.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sparksupport.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2019\/08\/cropped-logo-1.jpg","contentUrl":"https:\/\/sparksupport.com\/blog\/wp-content\/uploads\/2019\/08\/cropped-logo-1.jpg","width":216,"height":44,"caption":"SparkSupport"},"image":{"@id":"https:\/\/sparksupport.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/sparksupport.com\/blog\/#\/schema\/person\/16b0667e1ca1f0b86b76efba4d8fb691","name":"Vishnuprasad R","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/27e1772dd9b22580aea3d8b41a57418d2cd2ea18ce2a4d2254b28b0c0a32eb3e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/27e1772dd9b22580aea3d8b41a57418d2cd2ea18ce2a4d2254b28b0c0a32eb3e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/27e1772dd9b22580aea3d8b41a57418d2cd2ea18ce2a4d2254b28b0c0a32eb3e?s=96&d=mm&r=g","caption":"Vishnuprasad R"},"url":"https:\/\/sparksupport.com\/blog\/author\/vishnu\/"}]}},"_links":{"self":[{"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/posts\/346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/comments?post=346"}],"version-history":[{"count":0,"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/posts\/346\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/media\/5102"}],"wp:attachment":[{"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/media?parent=346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/categories?post=346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sparksupport.com\/blog\/wp-json\/wp\/v2\/tags?post=346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}