{"id":18,"date":"2012-11-04T16:43:00","date_gmt":"2012-11-04T16:43:00","guid":{"rendered":"http:\/\/www.mirageglobe.com\/wp\/?p=18"},"modified":"2012-11-04T16:43:00","modified_gmt":"2012-11-04T16:43:00","slug":"installing-nginx-on-macosx","status":"publish","type":"post","link":"https:\/\/pages.alldaycity.com\/mirageglobe\/installing-nginx-on-macosx\/","title":{"rendered":"Installing Nginx on MacOSX"},"content":{"rendered":"<div dir=\"ltr\">\n<h3>Installing NginX<\/h3>\n<p>If you are installing Nginx on MacOSX, i recommend using homebrew. Once you have home brew running, install nginx via:<\/p>\n<blockquote><p><i>brew install nginx<\/i><\/p><\/blockquote>\n<p>Once you have it installed, there are a few notes of where you will need to get your nginx running. You nginx config file will be in:<\/p>\n<blockquote><p><i>\/usr\/local\/etc\/nginx\/nginx.conf<\/i><\/p><\/blockquote>\n<p>if you are install it on Linux either debian or ubuntu. Just do this in terminal:<\/p>\n<blockquote><p><i>sudo apt-get install nginx<\/i><\/p><\/blockquote>\n<h3>Setting up Php for NginX<\/h3>\n<p>Once you have installed Nginx, you may want to get Php5.4 running. Using homebrew, you can install php-fpm (Php fast process manager) that is a process listening on your (default) port 9000. You can now set nginx to forward any php script requests to this process by adding the following:\u00a0PHP-FPM Configuration in the nginx.conf<\/p>\n<blockquote><p><i>location ~ .php$ {<br \/>\u00a0 \u00a0 #root \u00a0html;<br \/>\u00a0 \u00a0 fastcgi_pass \u00a0127.0.0.1:9000;<br \/>\u00a0 \u00a0 fastcgi_index \u00a0index.php;<br \/>\u00a0 \u00a0 #fastcgi_param \u00a0SCRIPT_FILENAME \u00a0\/scripts$fastcgi_script_name;<br \/>\u00a0 \u00a0 fastcgi_param \u00a0SCRIPT_FILENAME $document_root$fastcgi_script_name;<br \/>\u00a0 \u00a0 include \u00a0fastcgi_params;<br \/>}<\/i><\/p><\/blockquote>\n<p>You might find that the config may have this section of code commented out already. Just uncomment and restart your nginx server.<\/p>\n<blockquote><p><i>sudo nginx -s reload\u00a0<\/i><\/p><\/blockquote>\n<p>Something interesting is to check your hosts file (if you are using mac), it will be the file at \/etc\/hosts. To edit, type this command:<\/p>\n<blockquote><p><i>sudo nano \/etc\/hosts<\/i>\u00a0<\/p><\/blockquote>\n<p>Some configuration parameters which you will find useful.<\/p>\n<blockquote><p><i>index index.php index.htm index.html;<\/i>\u00a0\u00a0#Can be placed on the Http level if FPM is activated.<\/p><\/blockquote>\n<blockquote><p><i>root \/Users\/[your user id]\/Sites\/;<\/i>\u00a0#This will point to your sites folder on mac. Note [user id], use yours! This can be placed in the Server level<\/p><\/blockquote>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Installing NginX If you are installing Nginx on MacOSX, i recommend using homebrew. Once you have home brew running, install nginx via: brew install nginx Once you have it installed, there are a few notes of where you will need to get your nginx running. You nginx config file will be in: \/usr\/local\/etc\/nginx\/nginx.conf if you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-18","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":0,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"wp:attachment":[{"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/tags?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}