{"id":2124,"date":"2017-03-18T03:24:25","date_gmt":"2017-03-18T03:24:25","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=2124"},"modified":"2019-07-22T04:15:19","modified_gmt":"2019-07-22T04:15:19","slug":"magento-ce-2-1-5-with-sample-data-installation","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2017\/03\/18\/magento-ce-2-1-5-with-sample-data-installation\/","title":{"rendered":"Magento CE 2.1.5 (With Sample Data) Installation"},"content":{"rendered":"<p>I want to install Magento CE 2.1.5 (with sample data) in my machine Ubuntu 14.04 and PHP 7.0.<br \/>\nRef: <a href=\"http:\/\/devdocs.magento.com\/guides\/v2.1\/install-gde\/prereq\/zip_install.html\">http:\/\/devdocs.magento.com\/guides\/v2.1\/install-gde\/prereq\/zip_install.html<\/a><\/p>\n<ol>\n<li>Download the installation file from magento website. Here I downloaded the file with sample data in tar.bz2 format<\/li>\n<li>Extract the compressed file into your web root. I extract them in &#8216;magentoce215&#8217; directory.<\/li>\n<li>Modify the files permission of &#8216;magentoce215&#8217; directory. Here I used this command to make it easier for me to deal with the many security issues.\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~$ sudo chmod -R 777 Documents\/works\/magentoce215\/<\/pre>\n<\/li>\n<li>Open it the first time on your browser: http:\/\/localhost\/works\/magentoce215. It&#8217;d setup magento for the first time.<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-install.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2127\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-install.png\" alt=\"\" width=\"507\" height=\"398\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-install.png 507w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-install-300x236.png 300w\" sizes=\"auto, (max-width: 507px) 85vw, 507px\" \/><\/a>Click &#8216;Agree and Setup Magento&#8217; button. It&#8217;d bring us to next step, the check install page. Here is the looks<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-check-install.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2128\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-check-install.png\" alt=\"\" width=\"1002\" height=\"422\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-check-install.png 1002w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-check-install-300x126.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-check-install-768x323.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>I want to make sure anything would be okay so I click &#8216;Start Readiness Check&#8217; button. It&#8217;d check my php version and the php extension I have. It seemed I miss some extensions. Here is the result.<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-readiness.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2129\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-readiness.png\" alt=\"\" width=\"979\" height=\"987\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-readiness.png 979w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-readiness-150x150.png 150w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-readiness-298x300.png 298w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-readiness-768x774.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>I need to sort its out first. Install the missing php extensions.\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~$ sudo apt-get install php7.0-curl php7.0-mcrypt php7.0-intl php7.0-zip php7.0-gd<\/pre>\n<p>Then don&#8217;t forget to restart apache server<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy-K43SJ:~$ sudo service apache2 restart<\/pre>\n<p>Back to the browser then click &#8216;Try Again&#8217; button at the top of the page. If everything okay, I&#8217;ll get this page.<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-ready.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2130\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-ready.png\" alt=\"\" width=\"1003\" height=\"611\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-ready.png 1003w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-ready-300x183.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-ready-768x468.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>Then click &#8216;Next&#8217; button. It&#8217;d bring you to the database setting page. <a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-db-setting.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2131\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-db-setting.png\" alt=\"\" width=\"966\" height=\"533\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-db-setting.png 966w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-db-setting-300x166.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-db-setting-768x424.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>That is my database setting. I already created a new database &#8216;magentoce215&#8217; (utf8-general-ci) via phpmyadmin. Make sure the setting is correct! Then click &#8216;Next&#8217; button. Oops! I have MySQL Server 5.5.54 that not supported by magento ce 2.1.5. It recommended to use MySQL 5.6.0 or later!<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-mysql-version-not-support.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2133\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-mysql-version-not-support.png\" alt=\"\" width=\"1018\" height=\"395\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-mysql-version-not-support.png 1018w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-mysql-version-not-support-300x116.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-mysql-version-not-support-768x298.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>SO I NEED TO UPGRADE THE MYSQL VERSION TO MYSQL 5.6.0 OR LATER? OK. <a href=\"http:\/\/myprojects.advchaweb.com\/index.php\/2017\/03\/18\/upgrade-mysql-v-5-5-54-to-v-5-7-17\/\" target=\"_blank\" rel=\"noopener noreferrer\">I upgraded my MySQL server to 5.7 version<\/a>. Now everything is fine. Then I got this screen about my local magento web configuration.<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-web-config.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2150\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-web-config.png\" alt=\"\" width=\"1003\" height=\"470\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-web-config.png 1003w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-web-config-300x141.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-web-config-768x360.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>magento url: http:\/\/localhost\/works\/magentoce215\/<br \/>\nmagento admin url: http:\/\/localhost\/works\/magentoce215\/admin_dgj2ff<br \/>\nThen click &#8216;Next&#8217;. Then I modify my store setting like this:<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-store-setting.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2151\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-store-setting.png\" alt=\"\" width=\"989\" height=\"608\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-store-setting.png 989w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-store-setting-300x184.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-store-setting-768x472.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>I checked &#8216;Select All&#8217; for &#8216;Advanced Modules Configuration&#8217; because I want to use the samples data. Then click &#8216;Next&#8217;. Then fill out the admin form.<span class=\"rcp-restricted-content-message\">SORRY, ONLY ADMIN CAN SHOW THIS!<\/span><br \/>\nThen click &#8216;Next&#8217;. This is the last page to install magento.<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-install-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2153\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-install-1.png\" alt=\"\" width=\"992\" height=\"368\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-install-1.png 992w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-install-1-300x111.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-install-1-768x285.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>Click &#8216;Install Now&#8217; button. Wait until installation completed and you get the success page.<span class=\"rcp-restricted-content-message\">SORRY, ONLY ADMIN CAN SHOW THIS!<\/span><br \/>\nIt&#8217;s recommended for security, remove write permissions from these directories: &#8216;\/home\/teddy\/Documents\/works\/magentoce215\/app\/etc&#8217;.<br \/>\nWhen &#8216;Launch Magento Admin&#8217; button is clicked, it&#8217;d go to the admin page (http:\/\/localhost\/works\/magentoce215\/admin_dgj2ff).<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-login.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2156\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-login.png\" alt=\"\" width=\"532\" height=\"568\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-login.png 532w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-login-281x300.png 281w\" sizes=\"auto, (max-width: 532px) 85vw, 532px\" \/><\/a>Use your correct username and password to sign in. Here is the main admin page.<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-page.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2157\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-page-1024x687.png\" alt=\"\" width=\"840\" height=\"564\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-page-1024x687.png 1024w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-page-300x201.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-page-768x515.png 768w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-page-1200x805.png 1200w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-page.png 1351w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>Somehow I got an error like this:<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-error-index.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2158\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-error-index-1024x141.png\" alt=\"\" width=\"840\" height=\"116\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-error-index-1024x141.png 1024w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-error-index-300x41.png 300w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-error-index-768x105.png 768w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-admin-error-index.png 1049w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a>&#8220;One or more indexers are invalid. Make sure your Magento cron job is running.&#8221;. I think no need to worry right now.<br \/>\nHere is the main page (http:\/\/localhost\/works\/magentoce215\/) looks:<a href=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-main-page-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-2161\" src=\"http:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-main-page-2-493x1024.jpg\" alt=\"\" width=\"493\" height=\"1024\" srcset=\"https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-main-page-2-493x1024.jpg 493w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-main-page-2-145x300.jpg 145w, https:\/\/myprojects.advchaweb.com\/wp-content\/uploads\/2017\/03\/magentoce215-main-page-2.jpg 676w\" sizes=\"auto, (max-width: 493px) 85vw, 493px\" \/><\/a><\/li>\n<li>Use VirtualHost<br \/>\nI prefer to use virtualhost so I can open this magento with more pleasing url like http:\/\/magentoce215.dev. Here is the step:<br \/>\nCreate an apache file configuration:<\/p>\n<pre class=\"lang:default decode:true\">sudo gedit \/etc\/apache2\/sites-available\/magentoce215.dev.conf<\/pre>\n<p>Here is the file content:<\/p>\n<pre class=\"lang:default decode:true \">&lt;VirtualHost *:80&gt;\r\n    ServerName magentoce215.dev\r\n    ServerAlias www.magentoce215.dev\r\n    DocumentRoot \"\/home\/teddy\/Documents\/works\/magentoce215\"\r\n    DirectoryIndex index.php\r\n    &lt;Directory \"\/home\/teddy\/Documents\/works\/magentoce215\"&gt;\r\n        AllowOverride All\r\n        Allow from All\r\n        Require all granted\r\n    &lt;\/Directory&gt;\r\n&lt;\/VirtualHost&gt;<\/pre>\n<p>Enable the site:<\/p>\n<pre class=\"lang:default decode:true\">sudo a2ensite magentoce215.dev<\/pre>\n<p>Put the url in hosts file<\/p>\n<pre class=\"lang:default decode:true \">sudo gedit \/etc\/hosts<\/pre>\n<p>Here is the line:<\/p>\n<pre class=\"lang:default decode:true \">127.0.0.1\tmagentoce215.dev<\/pre>\n<p>Restart apache server<\/p>\n<pre class=\"lang:default decode:true \">sudo service apache2 restart<\/pre>\n<p>We need to clean and flush the cache and build and deploy the static files:<\/p>\n<pre class=\"lang:default decode:true\">teddy@teddy-K43SJ:~\/Documents\/works\/magentoce215$ sudo su -s \/bin\/bash www-data\r\nwww-data@teddy-K43SJ:\/home\/teddy\/Documents\/works\/magentoce215$ php bin\/magento cache:clean\r\nwww-data@teddy-K43SJ:\/home\/teddy\/Documents\/works\/magentoce215$ php bin\/magento cache:flush\r\nwww-data@teddy-K43SJ:\/home\/teddy\/Documents\/works\/magentoce215$ php bin\/magento setup:upgrade &amp;&amp; php bin\/magento setup:static-content:deploy<\/pre>\n<p>Test it on your browser: http:\/\/magentoce215.dev<br \/>\nIf there is no change on the url and still use the url:\u00a0 http:\/\/localhost\/works\/magentoce215, we need to update &#8216;base-url&#8217; and &#8216;base-url-secure&#8217; (ref: <a href=\"http:\/\/blog.netgloo.com\/2016\/05\/13\/magento-2-change-base-url-using-the-command-line\/\">http:\/\/blog.netgloo.com\/2016\/05\/13\/magento-2-change-base-url-using-the-command-line\/<\/a>) like this:<\/p>\n<pre class=\"lang:default decode:true\">www-data@teddy-K43SJ:\/home\/teddy\/Documents\/works\/magentoce215$ php bin\/magento setup:store-config:set --base-url=\"http:\/\/magentoce215.dev\/\"\r\nwww-data@teddy-K43SJ:\/home\/teddy\/Documents\/works\/magentoce215$ php bin\/magento setup:store-config:set --base-url-secure=\"https:\/\/magentoce215.dev\/\"\r\nwww-data@teddy-K43SJ:\/home\/teddy\/Documents\/works\/magentoce215$ php bin\/magento cache:flush<\/pre>\n<p>Test it again on your browser: http:\/\/magentoce215.dev and the admin url is http:\/\/magentoce215.dev\/admin_dgj2ff<\/li>\n<li>The looks are different with the version 1.X. Please read <a href=\"https:\/\/www.atwix.com\/magento-2\/magento-1-vs-magento-2\/\">https:\/\/www.atwix.com\/magento-2\/magento-1-vs-magento-2\/<\/a>, <a href=\"https:\/\/www.shopping-cart-migration.com\/blog\/42-magento\/43708-the-key-differences-between-magento-1x-and-20\">https:\/\/www.shopping-cart-migration.com\/blog\/42-magento\/43708-the-key-differences-between-magento-1x-and-20<\/a>, <a href=\"https:\/\/www.apptha.com\/blog\/magento-1-vs-magento-2-for-building-multi-vendor-marketplace\/\">https:\/\/www.apptha.com\/blog\/magento-1-vs-magento-2-for-building-multi-vendor-marketplace\/<\/a>, etc.<\/li>\n<li>Create a setup for nginx and php7.0-fpm<br \/>\nCreate the config file<\/p>\n<pre class=\"lang:default decode:true\">sudo gedit \/etc\/nginx\/sites-available\/magentoce215.test<\/pre>\n<p>Here is the content:<\/p>\n<pre class=\"lang:default decode:true\">server {\r\n    listen 80;\r\n    server_name magentoce215.test;\r\n    set $MAGE_ROOT \/home\/teddy\/Documents\/works\/magentoce215;\r\n\r\n    root $MAGE_ROOT;\r\n\r\n    index index.php;\r\n    autoindex off;\r\n    charset UTF-8;\r\n    error_page 404 403 = \/errors\/404.php;\r\n    #add_header \"X-UA-Compatible\" \"IE=Edge\";\r\n    client_max_body_size 100M;\r\n\r\n    # PHP entry point for setup application\r\n    location ~* ^\/setup($|\/) {\r\n        root $MAGE_ROOT;\r\n        location ~ ^\/setup\/index.php {\r\n            fastcgi_split_path_info ^(.+?\\.php)(\/.*)$;\r\n            fastcgi_buffers 1024 4k; \r\n            fastcgi_read_timeout 600s; \r\n            fastcgi_connect_timeout 600s;\r\n            fastcgi_pass unix:\/run\/php\/php7.0-fpm.sock; #FOR AWS SERVER\r\n            #fastcgi_pass 127.0.0.1:9000;\r\n            #fastcgi_index index.php;\r\n            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n            include fastcgi_params;\r\n        }\r\n\r\n        location ~ ^\/setup\/(?!pub\/). {\r\n            deny all;\r\n        }\r\n\r\n        location ~ ^\/setup\/pub\/ {\r\n            add_header X-Frame-Options \"SAMEORIGIN\";\r\n        }\r\n    }\r\n\r\n    # PHP entry point for update application\r\n    location ~* ^\/update($|\/) {\r\n        root $MAGE_ROOT;\r\n\r\n        location ~ ^\/update\/index.php {\r\n            fastcgi_split_path_info ^(\/update\/index.php)(\/.+)$;\r\n            fastcgi_pass unix:\/run\/php\/php7.0-fpm.sock; #FOR AWS SERVER\r\n            #fastcgi_pass 127.0.0.1:9000;\r\n            fastcgi_index index.php;\r\n            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n            fastcgi_param PATH_INFO $fastcgi_path_info;\r\n            include fastcgi_params;\r\n        }\r\n\r\n        # Deny everything but index.php\r\n        location ~ ^\/update\/(?!pub\/). {\r\n            deny all;\r\n        }\r\n\r\n        location ~ ^\/update\/pub\/ {\r\n            add_header X-Frame-Options \"SAMEORIGIN\";\r\n        }\r\n    }\r\n\r\n    location \/ {\r\n        try_files $uri $uri\/ \/index.php?$args;\r\n    }\r\n\r\n    location \/pub\/ {\r\n        location ~ ^\/pub\/media\/(downloadable|customer|import|theme_customization\/.*\\.xml) {\r\n            deny all;\r\n        }\r\n        alias $MAGE_ROOT\/pub\/;\r\n        add_header X-Frame-Options \"SAMEORIGIN\";\r\n    }\r\n\r\n\r\n    location ~ ^\/pub\/static\/version {\r\n        rewrite ^\/pub\/static\/(version\\d*\/)?(.*)$ \/pub\/static\/$2 last;\r\n    }\r\n\r\n    location \/static\/ {\r\n        # Uncomment the following line in production mode\r\n        # expires max;\r\n\r\n        # Remove signature of the static files that is used to overcome the browser cache\r\n        location ~ ^\/static\/version {\r\n            rewrite ^\/static\/(version\\d*\/)?(.*)$ \/static\/$2 last;\r\n        }\r\n\r\n        location ~* \\.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {\r\n            add_header Cache-Control \"public\";\r\n            add_header X-Frame-Options \"SAMEORIGIN\";\r\n            expires +1y;\r\n\r\n            if (!-f $request_filename) {\r\n                rewrite ^\/static\/(version\\d*\/)?(.*)$ \/static.php?resource=$2 last;\r\n            }\r\n        }\r\n\r\n        location ~* \\.(zip|gz|gzip|bz2|csv|xml)$ {\r\n            add_header Cache-Control \"no-store\";\r\n            add_header X-Frame-Options \"SAMEORIGIN\";\r\n            expires off;\r\n\r\n            if (!-f $request_filename) {\r\n                rewrite ^\/static\/(version\\d*\/)?(.*)$ \/static.php?resource=$2 last;\r\n            }\r\n        }\r\n\r\n        if (!-f $request_filename) {\r\n            rewrite ^\/static\/(version\\d*\/)?(.*)$ \/static.php?resource=$2 last;\r\n        }\r\n\r\n        add_header X-Frame-Options \"SAMEORIGIN\";\r\n    }\r\n\r\n    location \/media\/ {\r\n        try_files $uri $uri\/ \/get.php?$args;\r\n\r\n        location ~ ^\/media\/theme_customization\/.*\\.xml {\r\n            deny all;\r\n        }\r\n\r\n        location ~* \\.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {\r\n            add_header Cache-Control \"public\";\r\n            add_header X-Frame-Options \"SAMEORIGIN\";\r\n            expires +1y;\r\n            try_files $uri $uri\/ \/get.php?$args;\r\n        }\r\n\r\n        location ~* \\.(zip|gz|gzip|bz2|csv|xml)$ {\r\n            add_header Cache-Control \"no-store\";\r\n            add_header X-Frame-Options \"SAMEORIGIN\";\r\n            expires off;\r\n            try_files $uri $uri\/ \/get.php?$args;\r\n        }\r\n\r\n        add_header X-Frame-Options \"SAMEORIGIN\";\r\n    }\r\n\r\n    location \/media\/customer\/ {\r\n        deny all;\r\n    }\r\n\r\n    location \/media\/downloadable\/ {\r\n        deny all;\r\n    }\r\n\r\n    location \/media\/import\/ {\r\n        deny all;\r\n    }\r\n\r\n    # PHP entry point for main application\r\n    location ~ (index|get|static|report|404|503)\\.php$ {\r\n        try_files $uri =404;\r\n        fastcgi_pass unix:\/run\/php\/php7.0-fpm.sock; #FOR AWS SERVER\r\n        #fastcgi_pass 127.0.0.1:9000;\r\n        fastcgi_buffers 1024 4k;\r\n\r\n        fastcgi_read_timeout 600s;\r\n        fastcgi_connect_timeout 600s;\r\n\r\n        fastcgi_index index.php;\r\n        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n        #include fastcgi_params;\r\n        #FOR DEVELOPMENT MODE ONLY - BEGIN\r\n        fastcgi_param MAGE_IS_DEVELOPER_MODE true;\r\n        fastcgi_param PHP_VALUE  display_startup_errors=on;\r\n        fastcgi_param PHP_VALUE  display_errors=on;\r\n        fastcgi_param PHP_VALUE  html_errors=on;\r\n        fastcgi_param PHP_VALUE  log_errors=on;\r\n        fastcgi_param PHP_VALUE  error_log=\/home\/teddy\/Documents\/works\/magentoce215\/var\/log\/system.log;\r\n        #FOR DEVELOPMENT MODE ONLY - END\r\n        include fastcgi_params;\r\n        #FOR DEBUGGING WITH XDEBUG - BEGIN\r\n        #fastcgi_read_timeout 600;\r\n        #FOR DEBUGGING WITH XDEBUG - END\r\n    }\r\n\r\n    gzip on;\r\n    gzip_disable \"msie6\";\r\n\r\n    gzip_comp_level 6;\r\n    gzip_min_length 1100;\r\n    gzip_buffers 16 8k;\r\n    gzip_proxied any;\r\n    gzip_types\r\n    text\/plain\r\n    text\/css\r\n    text\/js\r\n    text\/xml\r\n    text\/javascript\r\n    application\/javascript\r\n    application\/x-javascript\r\n    application\/json\r\n    application\/xml\r\n    application\/xml+rss\r\n    image\/svg+xml;\r\n    gzip_vary on;\r\n\r\n    # Banned locations (only reached if the earlier PHP entry point regexes don't match)\r\n    location ~* (\\.php$|\\.htaccess$|\\.git) {\r\n        deny all;\r\n    }\r\n}<\/pre>\n<p>Enable file config<\/p>\n<pre class=\"lang:default decode:true\">sudo ln -s \/etc\/nginx\/sites-available\/magentoce215.test \/etc\/nginx\/sites-enabled\/magentoce215.test<\/pre>\n<p>Register the host on my system<\/p>\n<pre class=\"lang:default decode:true\">sudo gedit \/etc\/hosts<\/pre>\n<p>Like this:<\/p>\n<pre class=\"lang:default decode:true\">...\r\n127.0.0.1 \tmagentoce215.test\r\n...<\/pre>\n<p>CHECK THE NGINX SETTING AND RESTART IT:<\/p>\n<pre class=\"lang:default decode:true\">teddy@teddy:~$ sudo nginx -t\r\nnginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\r\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/pre>\n<pre class=\"lang:default decode:true\">sudo systemctl restart nginx<\/pre>\n<p>Set file permission and owner:<\/p>\n<pre class=\"lang:default decode:true\">sudo chown www-data -R var\/ pub\/ app\/etc\/ setup\/<\/pre>\n<p>Test: http:\/\/magentoce215.test &#8211;&gt; IT&#8217;S WORKING<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>I want to install Magento CE 2.1.5 (with sample data) in my machine Ubuntu 14.04 and PHP 7.0. Ref: http:\/\/devdocs.magento.com\/guides\/v2.1\/install-gde\/prereq\/zip_install.html Download the installation file from magento website. Here I downloaded the file with sample data in tar.bz2 format Extract the compressed file into your web root. I extract them in &#8216;magentoce215&#8217; directory. Modify the files &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2017\/03\/18\/magento-ce-2-1-5-with-sample-data-installation\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Magento CE 2.1.5 (With Sample Data) Installation&#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":[71,98,48,13],"tags":[],"class_list":["post-2124","post","type-post","status-publish","format-standard","hentry","category-magento","category-magento-tutorial","category-php-2","category-tutorial"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/2124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=2124"}],"version-history":[{"count":15,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/2124\/revisions"}],"predecessor-version":[{"id":4369,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/2124\/revisions\/4369"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=2124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=2124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=2124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}