{"id":30,"date":"2014-07-10T00:15:00","date_gmt":"2014-07-10T00:15:00","guid":{"rendered":"http:\/\/391@jodohost.com\/\/blog\/"},"modified":"2023-01-05T16:16:02","modified_gmt":"2023-01-05T16:16:02","slug":"configuring-the-rails-server-with-nginx-and-unicorn","status":"publish","type":"post","link":"http:\/\/www.jodohost.com\/blog\/index.php\/2014\/07\/10\/configuring-the-rails-server-with-nginx-and-unicorn\/","title":{"rendered":"Configuring the Rails server with Nginx and Unicorn"},"content":{"rendered":"<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p>We are going to setup and configure the Rails server on CentOS with Nginx and Unicorn using a JodoHost VPS account.<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<h2>\u2022 Our VPS system Details<\/h2>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 <strong>VPS Operating System:<\/strong> CentOS<br \/>o\u00a0\u00a0 <strong>VPS Hostname:<\/strong> server1.example.com<br \/>o\u00a0\u00a0 <strong>Server IP Address:<\/strong> 1.1.1.1<br \/>o\u00a0\u00a0 <strong>Username:<\/strong> username<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<h2>\u2022 Sign up for VPS<\/h2>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 To configure the Rails server we need a VPS to configure. For easy configuration and <br \/>management we shall sign up at <a href=\"http:\/\/www.jodohost.com\" target=\"_blank\" title=\"JoDoHost\" rel=\"noopener\">JodoHost<\/a>.<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<div class=\"pivotx-wrapper\"><a href='http:\/\/www.jodohost.com\/blog\/images\/2014-07\/screenshot_001.jpg' class=\"thickbox\" title=\"JoDoHost Homepage\" rel=\"entry-0\" ><img decoding=\"async\" src=\"http:\/\/www.jodohost.com\/blog\/images\/2014-07\/screenshot_001.thumb.jpg\" alt=\"JoDoHost Homepage\" title=\"JoDoHost Homepage\" class='pivotx-popupimage'\/><\/a><\/div>\n<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Choose from the various available plans that best suit your needs.<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<div class=\"pivotx-wrapper\"><a href='http:\/\/www.jodohost.com\/blog\/images\/2014-07\/screenshot_002.jpg' class=\"thickbox\" title=\"Plan Select\" rel=\"entry-0\" ><img decoding=\"async\" src=\"http:\/\/www.jodohost.com\/blog\/images\/2014-07\/screenshot_002.thumb.jpg\" alt=\"Plan Select\" title=\"Plan Select\" class='pivotx-popupimage'\/><\/a><\/div>\n<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 <strong>Step 1:<\/strong> Set up a domain name for yourself. I shall be using an existing domain in this case. You may also opt for new domain registration from here.<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\n<div class=\"pivotx-wrapper\"><a href='http:\/\/www.jodohost.com\/blog\/images\/2014-07\/screenshot_004.jpg' class=\"thickbox\" title=\"Step1 Register Domain\" rel=\"entry-0\" ><img decoding=\"async\" src=\"http:\/\/www.jodohost.com\/blog\/images\/2014-07\/screenshot_004.thumb.jpg\" alt=\"Step1 Register Domain\" title=\"Step1 Register Domain\" class='pivotx-popupimage'\/><\/a><\/div>\n<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 <strong>Step 2:<\/strong> Fill all the details required in the form and set your root password for the server here and <br \/>proceed next.<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\n<div class=\"pivotx-wrapper\"><a href='http:\/\/www.jodohost.com\/blog\/images\/2014-07\/screenshot_005.jpg' class=\"thickbox\" title=\"step2: choose options\" rel=\"entry-0\" ><img decoding=\"async\" src=\"http:\/\/www.jodohost.com\/blog\/images\/2014-07\/screenshot_005.thumb.jpg\" alt=\"step2: choose options\" title=\"step2: choose options\" class='pivotx-popupimage'\/><\/a><\/div>\n<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 <strong>Step 3:<\/strong> Choose a payment method and complete your order.<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\n<div class=\"pivotx-wrapper\"><a href='http:\/\/www.jodohost.com\/blog\/images\/2014-07\/screenshot_007.jpg' class=\"thickbox\" title=\"step3: payment confirmation\" rel=\"entry-0\" ><img decoding=\"async\" src=\"http:\/\/www.jodohost.com\/blog\/images\/2014-07\/screenshot_007.thumb.jpg\" alt=\"step3: payment confirmation\" title=\"step3: payment confirmation\" class='pivotx-popupimage'\/><\/a><\/div>\n<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 On the next page you shall see the invoice of your order. You should have already received a <br \/>copy of the invoice on your registered email and you may also download the copy from this <br \/>page also.<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<div class=\"pivotx-wrapper\"><a href='http:\/\/www.jodohost.com\/blog\/images\/2014-07\/screenshot_010.jpg' class=\"thickbox\" title=\"invoice\" rel=\"entry-0\" ><img decoding=\"async\" src=\"http:\/\/www.jodohost.com\/blog\/images\/2014-07\/screenshot_010.thumb.jpg\" alt=\"invoice\" title=\"invoice\" class='pivotx-popupimage'\/><\/a><\/div>\n<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 After this you will shortly receive an email at your registered email address for the payment <br \/>confirmation and your VPS details.<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<h2>\u2022 Login to VPS<\/h2>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 We shall login to our VPS machine via SSH:<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 ssh username@1.1.1.1<br \/><\/strong><\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Enter the password when prompted and you shall be logged into your VPS.<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<h2>\u2022 Updating And Preparing The Operating System<\/h2>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Run the following command to update the default tools for your CentOS VPS:<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 yum -y update<strong><br \/><\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Install the bundle containing development tools by executing the following command:<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 yum groupinstall -y &#8216;development tools&#8217;<strong><br \/><\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\">Add the EPEL software repository for the YUM package manager to use. It will install some of the <br \/>packages we need for this tutorial (e.g. libyaml-devel, nginx etc.)<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Enable EPEL Repository<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 su -c &#8216;rpm -Uvh http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-8.noarch.rpm&#8217;<strong><br \/><\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Update again to update the packages from the newly added repository.<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 yum -y update<strong><br \/><\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Get curl-devel and several other tools and libraries for this tutorial (e.g. Rails needs sqlitedevel).<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 yum install -y curl-devel nano sqlite-devel libyaml-devel<strong><br \/><\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<h2>\u2022 Setting Up the Ruby Environment and Rails<\/h2>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Run the following two commands to install RVM and create a system environment for Ruby:<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 curl -L get.rvm.io | bash -s stable<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><strong><strong><strong>\u00a7\u00a0 <\/strong>source \/etc\/profile.d\/rvm.sh<\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\"><strong><strong><br \/><\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Get RVM to download and install Ruby version 2.1.0:<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 <strong>rvm reload<\/strong><\/strong><\/p>\n<p style=\"padding-left: 60px;\"><strong><strong><strong>\u00a7\u00a0 <\/strong>rvm install 2.1.0<\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Rails needs first and foremost a JavaScript interpreter to work &#8211; we will also need to set up <br \/>Node.js. Run the following to download and install Node.js:<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 yum install -y nodejs<br \/><\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Execute the following command to download and install Rails using the bundler gem:<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 gem install bundler rails<strong><br \/><\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<h2>\u2022 Installing Nginx<\/h2>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Run the following to download and install Nginx<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 yum install -y nginx<br \/><\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<h2>\u2022 Installing Unicorn<\/h2>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Since it is an application-related dependency, the most logical way is to use RubyGems. Run the <br \/>following to download and install Unicorn:<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 gem install unicorn<\/strong><\/p>\n<p style=\"padding-left: 30px;\"><strong><br \/><\/strong><\/p>\n<p style=\"padding-left: 30px;\"><strong><br \/><\/strong><\/p>\n<h2>\u2022 Preparing Rails Applications For Deployment<\/h2>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 We shall be creating a sample application to test our server. First we are going to create a <br \/>directory to keep our Rails applications and then a folder for our test application.<\/p>\n<p style=\"padding-left: 60px;\"><strong><strong>\u00a7\u00a0 cd \/var<br \/><\/strong><\/strong><\/p>\n<p style=\"padding-left: 60px;\"><strong><strong><\/strong><strong><strong>\u00a7\u00a0 mkdir www<\/strong><\/strong><\/strong><\/p>\n<p style=\"padding-left: 60px;\"><strong><strong><strong>\u00a7\u00a0 cd www<\/strong><\/strong><\/strong><\/p>\n<p style=\"padding-left: 60px;\"><strong><strong><strong>\u00a7\u00a0 rails new sample_app<\/strong><\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\"><strong><strong><strong><br \/><\/strong><\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Enter the application directory<\/p>\n<p style=\"padding-left: 60px;\"><strong><strong>\u00a7<\/strong> cd sample_app<\/strong><\/p>\n<p style=\"padding-left: 30px;\"><strong><br \/><\/strong><\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Create a sample resource<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 rails generate scaffold User name:string age:integer<br \/><\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Create a sample database<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 RAILS_ENV=development rake db:migrate<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><strong><strong><strong>\u00a7\u00a0 RAILS_ENV=production rake db:migrate<br \/><\/strong><\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Create a directory to hold the PID files<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 mkdir pids<\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 To test that your application is set correctly and everything is working fine, enter the application<br \/>directory and start a simple server using the following command:<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 rails s<br \/><\/strong><\/p>\n<p style=\"padding-left: 30px;\"><strong><br \/><\/strong><\/p>\n<p style=\"padding-left: 30px;\"><strong><br \/><\/strong><\/p>\n<h2>\u2022 Configuring the web and app servers<\/h2>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 First create a shared directory to store logs, etc<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 mkdir \/var\/www\/shared<br \/><\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<h4 style=\"padding-left: 30px;\"><span style=\"text-decoration: underline;\">Unicorn Configuration<\/span><\/h4>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Let\u2019s configure Unicorn to work with Nginx and set the paths for logs, etc. Here we shall set the <br \/>configuration details, like the root path of our application. As this file resides inside our application this configuration will be application-specific. We are going to set up a basic configuration here. There are a lot of options available to configure with more controls. Edit the Unicorn file inside the \u2018config\u2019 folder at the root of your application:<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 <strong>nano config\/unicorn.rb<\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">Sample Configuration for \u2018 <strong>config\/unicorn.rb<\/strong>\u2019:<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<h6 style=\"padding-left: 60px;\">root_path = &#8220;\/var\/www\/sample_app&#8221;<br \/>shared_path = &#8220;\/var\/www\/shared&#8221;<br \/>working_directory root_path<br \/>pid &#8220;#{shared_path}\/tmp\/pids\/unicorn.pid&#8221;<br \/>stderr_path &#8220;#{shared_path}\/log\/unicorn.log&#8221;<br \/>stdout_path &#8220;#{shared_path}\/log\/unicorn.log&#8221;<br \/>listen 3000<br \/>worker_processes 2<br \/>timeout 30<\/h6>\n<p style=\"padding-left: 60px;\">\u00a0<\/p>\n<p style=\"padding-left: 60px;\">\u00a0<\/p>\n<h4 style=\"padding-left: 30px;\"><span style=\"text-decoration: underline;\">Nginx Configuration<\/span><\/h4>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Edit the Nginx configuration file to set it working with our Unicorn app server<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 nano \/etc\/nginx\/conf.d\/default.conf<\/strong><\/p>\n<p style=\"padding-left: 30px;\"><strong><br \/><\/strong>Sample Configuration for \u2018<strong>\/etc\/nginx\/conf.d\/default.conf<\/strong> \u2019:<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<h6 style=\"padding-left: 60px;\">upstream app {<br \/>\u00a0 # Path to Unicorn SOCK file, as defined previously<br \/>\u00a0 server 0.0.0.0:3000;<br \/>}<\/p>\n<p>server {<br \/>\u00a0 listen 80;<br \/>\u00a0 server_name localhost;<br \/>\u00a0 # Application root, as defined previously<br \/>\u00a0 root \/root\/sample_app\/public;<br \/>\u00a0 try_files $uri\/index.html $uri @app;<\/p>\n<p>\u00a0 location @app {<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header Host $http_host;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_redirect off;<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_pass http:\/\/app;<br \/>\u00a0 }<\/p>\n<p>\u00a0 error_page 500 502 503 504 \/500.html;<br \/>\u00a0 client_max_body_size 4G;<br \/>\u00a0 keepalive_timeout 10;<br \/>}<\/h6>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\"><strong><br \/><\/strong><\/p>\n<h2>\u2022 Start the servers<\/h2>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Run the Unicorn server<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 unicorn_rails -c config\/unicorn.rb \u2013D<br \/><\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">o\u00a0\u00a0 Restart the Nginx server<\/p>\n<p style=\"padding-left: 60px;\"><strong>\u00a7\u00a0 service nginx restart<strong><br \/><\/strong><\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<p style=\"padding-left: 30px;\">\u00a0<\/p>\n<h3>We have successfully set up the Rails server, testing it with our sample app, on the JodoHost VPS server and our newly configured Rails server is ready to use.<\/h3>\n<p style=\"padding-left: 30px;\"><strong><br \/><\/strong><\/p>\n<p> ]]><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 We are going to setup and configure the Rails server on CentOS with Nginx and Unicorn using a JodoHost VPS account. \u00a0 \u00a0 \u2022 Our VPS system Details \u00a0 o\u00a0\u00a0 VPS Operating System: CentOSo\u00a0\u00a0 VPS Hostname: server1.example.como\u00a0\u00a0 Server IP Address: 1.1.1.1o\u00a0\u00a0 Username: username \u00a0 \u2022 Sign up for VPS \u00a0 o\u00a0\u00a0 To configure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/30"}],"collection":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":1,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":324,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions\/324"}],"wp:attachment":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}