{"id":2777,"date":"2018-11-07T13:48:21","date_gmt":"2018-11-07T13:48:21","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=2777"},"modified":"2018-11-07T13:52:18","modified_gmt":"2018-11-07T13:52:18","slug":"how-to-install-nginx-with-virtual-hosts-and-ssl-certificate","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/11\/07\/how-to-install-nginx-with-virtual-hosts-and-ssl-certificate\/","title":{"rendered":"How to Install Nginx with Virtual Hosts and SSL Certificate"},"content":{"rendered":"<p>Nginx (short for Engine-x) is a free, open source, powerful, high-performance and scalable HTTP and reverse proxy server, a mail and standard TCP\/UDP proxy server. It is easy to use and configure, with a simple configuration language. Nginx is now the preferred web server software for powering heavily loaded sites, due its scalability and performance.<\/p>\n<p>In this article will discuss how to use Nginx as a HTTP server, configure it to serve web content, and set up name-based virtual hosts, and create and install SSL for secure data transmissions, including a self-signed certificate on Ubuntu and CentOS.<\/p>\n<h3>How to Install Nginx Web Server<\/h3>\n<p>First start by installing the Nginx package from the official repositories using your package manager as shown.<\/p>\n<p>&#8212;&#8212;&#8212;&#8212; On Ubuntu &#8212;&#8212;&#8212;&#8212;<br \/>\n$ sudo apt update<br \/>\n$ sudo apt install nginx<\/p>\n<p>&#8212;&#8212;&#8212;&#8212; On CentOS &#8212;&#8212;&#8212;&#8212;<br \/>\n$ sudo yum update<br \/>\n$ sudo yum install epel-release<br \/>\n$ sudo yum install nginx<\/p>\n<p>After the Nginx package is installed, you need to start the service for now, enable it to auto-start at boot time and view it\u2019s status, using the following commands. Note that on Ubuntu, it should be started and enabled automatically while the package is pre-configured.<\/p>\n<p>$ sudo systemctl start nginx<br \/>\n$ sudo systemctl senable nginx<br \/>\n$ sudo systemctl status nginx<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/11\/Start-and-Check-Nginx-Status.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif\" alt=\"Start and Check Nginx Status\" width=\"802\" height=\"401\" \/><\/a><\/p>\n<p>Start and Check Nginx Status<\/p>\n<p>At this point, the Nginx web server should be up and running, you can verify the status with the <a href=\"https:\/\/www.tecmint.com\/20-netstat-commands-for-linux-network-management\/\" target=\"_blank\" rel=\"noopener\">netstat command<\/a>.<\/p>\n<p>$ sudo netstat -tlpn | grep nginx<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/11\/Check-Nginx-Port-Status.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif\" alt=\"Check Nginx Port Status\" width=\"794\" height=\"62\" \/><\/a><\/p>\n<p>Check Nginx Port Status<\/p>\n<p>If your system has a firewall enabled, you need to open port 80 and 443 to allow HTTP and HTTPS traffic respectively, through it, by running.<\/p>\n<p>&#8212;&#8212;&#8212;&#8212; On CentOS &#8212;&#8212;&#8212;&#8212;<br \/>\n$ sudo firewall-cmd &#8211;permanent &#8211;add-port=80\/tcp<br \/>\n$ sudo firewall-cmd &#8211;permanent &#8211;add-port=443\/tcp<br \/>\n$ sudo firewall-cmd &#8211;reload<\/p>\n<p>&#8212;&#8212;&#8212;&#8212; On Ubuntu &#8212;&#8212;&#8212;&#8212;<br \/>\n$ sudo ufw allow 80\/tcp<br \/>\n$ sudo ufw allow 443\/tcp<br \/>\n$ sudo ufw reload<\/p>\n<p>The ideal method for testing the Nginx installation and checking whether it\u2019s running and able to serve web pages is by opening a web browser and pointing to the IP of the server.<\/p>\n<p>http:\/\/Your-IP-Address<br \/>\nOR<br \/>\nhttp:\/\/Your-Domain.com<\/p>\n<p>A working installation should be indicated by the following screen.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/11\/Check-Nginx-Web-Page.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif\" alt=\"Check Nginx Web Page\" width=\"749\" height=\"403\" \/><\/a><\/p>\n<p>Check Nginx Web Page<\/p>\n<h3>How to Configure Nginx Web Server<\/h3>\n<p>Nginx\u2019s configuration files are located in the directory \/etc\/nginx and the global configuration file is located at \/etc\/nginx\/nginx.conf on both CentOS and Ubuntu.<\/p>\n<p>Nginx is made up of modules that are controlled by various configuration options, known as directives. A directive can either be simple (in the form name and values terminated with a \ud83d\ude09 or block ( has extra instructions enclosed using {}). And a block directive which contains other directives is called a context.<\/p>\n<p>All the directives are comprehensively explained in the <a href=\"https:\/\/nginx.org\/en\/docs\/\" target=\"_blank\" rel=\"noopener\">Nginx documentation<\/a> in the project website. You can refer to it for more information.<\/p>\n<h4>How to Serve Static Content Using Nginx in Standalone Mode<\/h4>\n<p>At a foundational level, Nginx can be used to serve static content such as HTML and media files, in standalone mode, where only the default server block is used (analogous to Apache where no virtual hosts have been configured).<\/p>\n<p>We will start by briefly explaining the configuration structure in the main configuration file.<\/p>\n<p>$ sudo vim \/etc\/nginx\/nginx.conf<\/p>\n<p>If you look into this Nginx configuration file, the configuration structure should appear as follows and this is referred to as the main context, which contains many other simple and block directives. All web traffic is handled in the http context.<\/p>\n<p>user nginx;<br \/>\nworker_processes 1;<br \/>\n&#8230;..<\/p>\n<p>error_log \/var\/log\/nginx\/error.log warn;<br \/>\npid \/var\/run\/nginx.pid;<br \/>\n&#8230;..<\/p>\n<p>events {<br \/>\n&#8230;..<br \/>\n}<\/p>\n<p>http {<br \/>\nserver{<br \/>\n\u2026\u2026.<br \/>\n}<br \/>\n&#8230;..<br \/>\n}<\/p>\n<p>The following is a sample Nginx main configuration (\/etc\/nginx\/nginx.conf) file, where the http block above contains an include directive which tells Nginx where to find website configuration files (virtual host configurations).<\/p>\n<p>Nginx Configuration File<\/p>\n<p>user www-data;<br \/>\nworker_processes auto;<br \/>\npid \/run\/nginx.pid;<\/p>\n<p>events {<br \/>\nworker_connections 768;<br \/>\n# multi_accept on;<br \/>\n}<\/p>\n<p>http {<br \/>\ninclude \/etc\/nginx\/mime.types;<br \/>\ndefault_type application\/octet-stream;<\/p>\n<p>include \/etc\/nginx\/mime.types;<br \/>\ndefault_type application\/octet-stream;<\/p>\n<p>access_log \/var\/log\/nginx\/access.log;<br \/>\nerror_log \/var\/log\/nginx\/error.log;<\/p>\n<p>sendfile on;<br \/>\n#tcp_nopush on;<br \/>\nkeepalive_timeout 65;<br \/>\n#gzip on;<\/p>\n<p>include \/etc\/nginx\/conf.d\/*.conf;<br \/>\n}<\/p>\n<p>Note that on Ubuntu, you will also find an additional include directive (include \/etc\/nginx\/sites-enabled\/*;), where the directory \/etc\/nginx\/sites-enabled\/ stores symlinks to the websites configuration files created in \/etc\/nginx\/sites-available\/, to enable the sites. And deleting a symlink disables that particular site.<\/p>\n<p>Based on your installation source, you\u2019ll find the default website configuration file at \/etc\/nginx\/conf.d\/default.conf (if you installed from official NGINX repository and EPEL) or \/etc\/nginx\/sites-enabled\/default (if you installed from Ubuntu repositories).<\/p>\n<p>This is our sample default nginx server block located at \/etc\/nginx\/conf.d\/default.conf on the test system.<\/p>\n<p>server {<br \/>\nlisten 80 default_server;<br \/>\nlisten [::]:80 default_server;<br \/>\nserver_name _;<br \/>\nroot \/var\/www\/html\/;<br \/>\nindex index.html;<br \/>\nlocation \/ {<br \/>\ntry_files $uri $uri\/ =404;<br \/>\n}<br \/>\n}<\/p>\n<p>A brief explanation of the directives in the above configuration:<\/p>\n<ul>\n<li>listen: specifies the port the server listens on.<\/li>\n<li>server_name: defines the server name which can be exact names, wildcard names, or regular expressions.<\/li>\n<li>root: specifies the directory out of which Nginx will serve web pages and other documents.<\/li>\n<li>index: specifies the type(s) of index file(s) to be served.<\/li>\n<li>location: used to process requests for specific files and folders.<\/li>\n<\/ul>\n<p>From a web browser, when you point to the server using the hostname localhost or its IP address, it processes the request and serves the file \/var\/www\/html\/index.html, and immediately saves the event to its access log (\/var\/log\/nginx\/access.log) with a 200 (OK) response. In case of an error (failed event), it records the message in the error log (\/var\/log\/nginx\/error.log).<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/11\/Test-Nginx-Default-Site.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif\" alt=\"Test Nginx Default Site\" width=\"749\" height=\"354\" \/><\/a><\/p>\n<p>Test Nginx Default Site<\/p>\n<p>To learn more about logging in Nginx, you may refer to <a href=\"https:\/\/www.tecmint.com\/configure-custom-access-and-error-log-formats-in-nginx\/\" target=\"_blank\" rel=\"noopener\">How to Configure Custom Access or Error Log Formats in Nginx<\/a>.<\/p>\n<p>Instead of using the default log files, you can define custom log files for different web sites, as we shall look at later on, under the section \u201c<a href=\"https:\/\/www.tecmint.com\/nginx-name-based-and-ip-based-virtual-hosts-server-blocks\/\" target=\"_blank\" rel=\"noopener\">setting up name-based virtual hosts (server blocks)<\/a>\u201d.<\/p>\n<h4>How ot Restrict Access to a Web Page with Nginx<\/h4>\n<p>In order to restrict access to your website\/application or some parts of it, you can setup <a href=\"https:\/\/www.tecmint.com\/setup-nginx-basic-http-authentication\/\" target=\"_blank\" rel=\"noopener\">basic HTTP authentication<\/a>. This can be used essentially to restrict access to the whole HTTP server, individual server blocks or location blocks.<\/p>\n<p>Start by creating a file that will store your access credentials (username\/password) by using the htpasswd utility.<\/p>\n<p>$ yum install httpd-tools #RHEL\/CentOS<br \/>\n$ sudo apt install apache2-utils #Debian\/Ubuntu<\/p>\n<p>As an example, let\u2019s add user admin to this list (you can add as many users as possible), where the -c option is used to specify the password file, and the -B to encrypt the password. Once you hit [Enter], you will be asked to enter the users password:<\/p>\n<p>$ sudo htpasswd -Bc \/etc\/nginx\/conf.d\/.htpasswd admin<\/p>\n<p>Then, let\u2019s assign the proper permissions and ownership to the password file (replace the user and group nginx with www-data on Ubuntu).<\/p>\n<p>$ sudo chmod 640 \/etc\/nginx\/conf.d\/.htpasswd<br \/>\n$ sudo chmod nginx:nginx \/etc\/nginx\/conf.d\/.htpasswd<\/p>\n<p>As we mentioned earlier on, you can restrict access to your webserver, a single website (using its server block) or specific directory or file. Two useful directives can be used to achieve this:<\/p>\n<ul>\n<li>auth_basic \u2013 turns on validation of user name and password using the \u201cHTTP Basic Authentication\u201d protocol.<\/li>\n<li>auth_basic_user_file \u2013 specifies the credential\u2019s file.<\/li>\n<\/ul>\n<p>As an example, we will show how to password-protect the directory \/var\/www\/html\/protected.<\/p>\n<p>server {<br \/>\nlisten 80 default_server;<br \/>\nserver_name localhost;<br \/>\nroot \/var\/www\/html\/;<br \/>\nindex index.html;<br \/>\nlocation \/ {<br \/>\ntry_files $uri $uri\/ =404;<br \/>\n}<\/p>\n<p>location \/protected\/ {<br \/>\nauth_basic &#8220;Restricted Access!&#8221;;<br \/>\nauth_basic_user_file \/etc\/nginx\/conf.d\/.htpasswd;<br \/>\n}<br \/>\n}<\/p>\n<p>Now, save changes and restart Nginx service.<\/p>\n<p>$ sudo systemctl restart nginx<\/p>\n<p>The next time you point your browser to the above directory (http:\/\/localhost\/protected) you will be asked to enter your login credentials (username admin and the chosen password).<\/p>\n<p>A successful login allows you to access the directory\u2019s contents, otherwise you will get a a \u201c401 Authorization Required\u201d error.<\/p>\n<h3>How to Setup Name-based Virtual hosts (Server Blocks) in Nginx<\/h3>\n<p>The server context allows multiple domains\/sites to be stored in and served from the same physical machine or virtual private server (VPS). Multiple server blocks (representing virtual hosts) can be declared within the http context for each site\/domain. Nginx decides which server processes a request based on the request header it receives.<\/p>\n<p>We will demonstrate this concept using the following dummy domains, each located in the specified directory:<\/p>\n<ul>\n<li>wearetecmint.com \u2013 \/var\/www\/html\/wearetecmint.com\/<\/li>\n<li>welovelinux.com \u2013 \/var\/www\/html\/welovelinux.com\/<\/li>\n<\/ul>\n<p>Next, assign the appropriate permissions on the directory for each site.<\/p>\n<p>$ sudo chmod -R 755 \/var\/www\/html\/wearetecmint.com\/public_html<br \/>\n$ sudo chmod -R 755 \/var\/www\/html\/welovelinux.com\/public_html<\/p>\n<p>Now, create a sample index.html file inside each public_html directory.<\/p>\n<p>&lt;html&gt;<br \/>\n&lt;head&gt;<br \/>\n&lt;title&gt;www.wearetecmint.com&lt;\/title&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;h1&gt;This is the index page of www.wearetecmint.com&lt;\/h1&gt;<br \/>\n&lt;\/body&gt;<br \/>\n&lt;\/html&gt;<\/p>\n<p>Next, create the server block configuration files for each site inside the \/etc\/httpd\/conf.d directory.<\/p>\n<p>$ sudo vi \/etc\/nginx\/conf.d\/wearetecmint.com.conf<br \/>\n$ sudo vi \/etc\/nginx\/conf.d\/welovelinux.com.conf<\/p>\n<p>Add the following server block declaration in the wearetecmint.com.conf file.<\/p>\n<p>wearetecmint.com.conf<\/p>\n<p>server {<br \/>\nlisten 80;<br \/>\nserver_name wearetecmint.com;<br \/>\nroot \/var\/www\/html\/wearetecmint.com\/public_html ;<br \/>\nindex index.html;<br \/>\nlocation \/ {<br \/>\ntry_files $uri $uri\/ =404;<br \/>\n}<\/p>\n<p>}<\/p>\n<p>Next, add the following server block declaration in the welovelinux.com.conf file.<\/p>\n<p>welovelinux.com.conf<\/p>\n<p>server {<br \/>\nlisten 80;<br \/>\nserver_name welovelinux.com;<br \/>\nroot \/var\/www\/html\/welovelinux.com\/public_html;<br \/>\nindex index.html;<br \/>\nlocation \/ {<br \/>\ntry_files $uri $uri\/ =404;<br \/>\n}<\/p>\n<p>}<\/p>\n<p>To apply the recent changes, restart the Nginx web server.<\/p>\n<p>$ sudo systemctl restart nginx<\/p>\n<p>and pointing your web server to the above addresses should make you see the main pages of the dummy domains.<\/p>\n<p>http:\/\/wearetecmint.com<br \/>\nhttp:\/\/welovelinux.com<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/11\/Test-Nginx-Virtual-Hosts-Websites.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif\" alt=\"Test Nginx Virtual Hosts Websites\" width=\"890\" height=\"296\" \/><\/a><\/p>\n<p>Test Nginx Virtual Hosts Websites<\/p>\n<p>Important: If you have SELinux enabled, its default configuration does not allow Nginx to access files outside of well-known authorized locations (such as \/etc\/nginx for configurations, \/var\/log\/nginx for logs, \/var\/www\/html for web files etc..).<\/p>\n<p>You can handle this by either disabling SELinux, or setting the correct security context. For more information, refer to this guide: <a href=\"https:\/\/www.nginx.com\/blog\/using-nginx-plus-with-selinux\/\" target=\"_blank\" rel=\"noopener\">using Nginx and Nginx Plus with SELinux<\/a> on the Nginx Plus website.<\/p>\n<h3>How to Install and Configure SSL with Nginx<\/h3>\n<p>SSL certificates help to enable secure http (HTTPS) on your site, which is essential to establishing a trusted\/secure connection between the end users and your server by encrypting the information that is transmitted to, from, or within your site.<\/p>\n<p>We will cover how to create and install a self-signed certificate, and generate a certificate signing request (CSR) to acquire an SSL certificate from a certificate authority (CA), to use with Nginx.<\/p>\n<p>Self-signed certificates are free to create and are practically good to go for testing purposes and for internal LAN-only services. For public-facing servers, it is highly recommended to use a certificate issued by a CA (for example <a href=\"https:\/\/www.tecmint.com\/setup-https-with-lets-encrypt-ssl-certificate-for-nginx-on-centos\/\" target=\"_blank\" rel=\"noopener\">Let\u2019s Encrypt<\/a>) to uphold its authenticity.<\/p>\n<p>To create a self-signed certificate, first create a directory where your certificates will be stored.<\/p>\n<p>$ sudo mkdir \/etc\/nginx\/ssl-certs\/<\/p>\n<p>Then generate your self-signed certificate and the key using the openssl command line tool.<\/p>\n<p>$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout \/etc\/nginx\/ssl-certs\/nginx.key -out \/etc\/nginx\/ssl-certs\/nginx.crt<\/p>\n<p>Let\u2019s briefly describe the options used in the above command:<\/p>\n<ul>\n<li>req -X509 \u2013 shows we are creating a x509 certificate.<\/li>\n<li>-nodes (NO DES) \u2013 means \u201cdon\u2019t encrypt the key\u201d.<\/li>\n<li>-days 365 \u2013 specifies the number of days the certificate will be valid for.<\/li>\n<li>-newkey rsa:2048 \u2013 specifies that the key generated using RSA algorithm should be 2048-bit.<\/li>\n<li>-keyout \/etc\/httpd\/ssl-certs\/apache.key \u2013 specifies the full path of the RSA key.<\/li>\n<li>-out \/etc\/httpd\/ssl-certs\/apache.crt \u2013 specifies the full path of the certificate.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/11\/Create-SSL-Certificate-and-Key-for-Nginx.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif\" alt=\"Create SSL Certificate and Key for Nginx\" width=\"802\" height=\"420\" \/><\/a><\/p>\n<p>Create SSL Certificate and Key for Nginx<\/p>\n<p>Next, open your virtual host configuration file and add the following lines to a server block declaration listening on port 443. We will test with the virtual host file \/etc\/nginx\/conf.d\/wearetecmint.com.conf.<\/p>\n<p>$ sudo vi \/etc\/nginx\/conf.d\/wearetecmint.com.conf<\/p>\n<p>Then add the ssl directive to nginx configuration file, it should look similar to below.<\/p>\n<p>server {<br \/>\nlisten 80;<br \/>\nlisten [::]:80;<br \/>\nlisten 443 ssl;<br \/>\nlisten [::]:443 ssl;<\/p>\n<p>ssl on;<br \/>\nssl_certificate \/etc\/nginx\/ssl-certs\/nginx.crt;<br \/>\nssl_trusted_certificate \/etc\/nginx\/ssl-certs\/nginx.crt;<br \/>\nssl_certificate_key \/etc\/nginx\/ssl-certs\/nginx.key;<\/p>\n<p>server_name wearetecmint.com;<br \/>\nroot \/var\/www\/html\/wearetecmint.com\/public_html;<br \/>\nindex index.html;<br \/>\nlocation \/ {<br \/>\ntry_files $uri $uri\/ =404;<br \/>\n}<\/p>\n<p>}<\/p>\n<p>Now restart the Nginx and point your browser to the following address.<\/p>\n<p>https:\/\/www.wearetecmint.com<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2018\/11\/Check-Nginx-SSL-Website.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.tecmint.com\/wp-content\/plugins\/lazy-load\/images\/1x1.trans.gif\" alt=\"Check Nginx SSL Website\" width=\"898\" height=\"221\" \/><\/a><\/p>\n<p>Check Nginx SSL Website<\/p>\n<p>If you would like to purchase an SSL certificate from a CA, you need to generate a certificate signing request (CSR) as shown.<\/p>\n<p>$ sudo openssl req -newkey rsa:2048 -nodes -keyout \/etc\/nginx\/ssl-certs\/example.com.key -out \/etc\/nginx\/ssl-certs\/example.com.csr<\/p>\n<p>You can also create a CSR from an existing private key.<\/p>\n<p>$ sudo openssl req -key \/etc\/nginx\/ssl-certs\/example.com.key -new -out \/etc\/nginx\/ssl-certs\/example.com.csr<\/p>\n<p>Then, you need to send the CSR that is generated to a CA to request the issuance of a CA-signed SSL certificate. Once you receive your certificate from the CA, you can configure it as shown above.<\/p>\n<p>Read Also: <a href=\"https:\/\/www.tecmint.com\/nginx-web-server-security-hardening-and-performance-tips\/\">The Ultimate Guide to Secure, Harden and Improve Performance of Nginx Web Server<\/a><\/p>\n<h5>Summary<\/h5>\n<p>In this article, we have explained how to install and configure Nginx; covered how to setup name-based virtual hosting with SSL to secure data transmissions between the web server and a client.<\/p>\n<p>If you experienced any setbacks during your nginx installation\/configuration process or have any questions or comments, use the feedback form below to reach us.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/install-nginx-with-virtual-hosts-and-ssl-certificate\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nginx (short for Engine-x) is a free, open source, powerful, high-performance and scalable HTTP and reverse proxy server, a mail and standard TCP\/UDP proxy server. It is easy to use and configure, with a simple configuration language. Nginx is now the preferred web server software for powering heavily loaded sites, due its scalability and performance. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/11\/07\/how-to-install-nginx-with-virtual-hosts-and-ssl-certificate\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Install Nginx with Virtual Hosts and SSL Certificate&#8221;<\/span><\/a><\/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-2777","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/2777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=2777"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/2777\/revisions"}],"predecessor-version":[{"id":2786,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/2777\/revisions\/2786"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=2777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=2777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=2777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}