{"id":65,"date":"2018-10-20T05:27:53","date_gmt":"2018-10-20T05:27:53","guid":{"rendered":"https:\/\/vernonkeenan.com\/?p=65"},"modified":"2021-05-30T14:47:06","modified_gmt":"2021-05-30T21:47:06","slug":"start-a-php-7-2-slim-project-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/","title":{"rendered":"Start a PHP 7.2 Slim Project on Ubuntu 18.04"},"content":{"rendered":"\n<p class=\"has-drop-cap wp-block-paragraph\">I use <a href=\"https:\/\/www.slimframework.com\/\">Slim<\/a>, a lightweight PHP framework for creating HTTP applications and APIs using &#8220;<a href=\"https:\/\/www.slimframework.com\/docs\/v3\/objects\/router.html\">routes<\/a>.&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s my formula for deploying my Slim app on Ubuntu 18.04 with PHP 7.2. This has worked on GCP and AWS, as well as my own hosted cluster.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Please note that I will be working with a raw <code>sudo<\/code> terminal session, so I will omit the use of&nbsp;<code>sudo<\/code> from these instructions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">One Fresh LAMP Image, Please<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let us start with a fresh installation of Ubuntu 18.04.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ceres-gw.tnxs.net\/wp-content\/uploads\/2018\/10\/tasksel-1.png\" alt=\"\" class=\"wp-image-69\" width=\"228\" height=\"265\" srcset=\"https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/tasksel-1.png 976w, https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/tasksel-1-257x300.png 257w, https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/tasksel-1-877x1024.png 877w, https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/tasksel-1-768x896.png 768w\" sizes=\"auto, (max-width: 228px) 100vw, 228px\" \/><\/figure><\/div>\n\n\n\n<pre class=\"wp-block-preformatted\"># important!<br>apt update<br>apt -y upgrade<br>reboot<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I like using <code>tasksel<\/code> to install LAMP (Apache, MySql and PHP). <code>tasksel<\/code> is the menu you encounter when installing Ubuntu from an ISO. If I am installing on a cloud service, I don&#8217;t get the opportunity to use this menu, so I have to install it manually.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt install -y tasksel<br>tasksel<br># Scroll down to LAMP Server<br># Hit Spacebar to select<br># Tab to the OK button and hit Enter<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After I install MySql, I always secure it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql_secure_installation<br># Follow the prompts and accept all security recommendations<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Use Certbot for Free SSL<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Hooray for <a href=\"https:\/\/certbot.eff.org\/\">Certbot<\/a> and <a href=\"https:\/\/letsencrypt.org\/\">Let&#8217;s Encrypt<\/a>! Now it only takes a few minutes to configure Apache with SSL certificates.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configure Public Domain Names<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em><strong>Super-important first step:<\/strong><\/em>&nbsp;<em>assign a domain name you control to the public IP address of your hosted Ubuntu instance<\/em>. The public clouds give you a public IP when you set up a new instance. Use that IP address to set up DNS A records for your host.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, if I have a domain called <code>mydomain.com<\/code>, and I want a host to be called <code>api.mydomain.com<\/code> and <code>www.mydomain.com<\/code>, and I want <code>mydomain.com<\/code> to work as well, and my public-facing IP address is&nbsp;<code>34.34.34.34<\/code>, then I need these A records in my&nbsp;<code>mydomain.com.db<\/code>&nbsp;DNS zone file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">@    14400  IN  A  34.34.34.34<br>api&nbsp; 14400&nbsp; IN&nbsp; A&nbsp; 34.34.34.34<br>www  14400  IN  A  34.34.34.34<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Use Certbot to Install Let&#8217;s Encrypt Certificates<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Start by installing Certbot and accepting the license terms.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">add-apt-repository ppa:certbot\/certbot<br># Hit Enter to accept the terms<br>apt install -y python-certbot-apache<br><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Run the <code>certbot<\/code> command as shown, entering all of your domain names. Enter your email address for identification and sign up for the&nbsp;<a href=\"https:\/\/eff.org\/\">EFF.org<\/a>&nbsp;newsletter!&nbsp;Pick the option to automatically redirect your HTTP traffic to HTTPS.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">certbot --apache -d mydomain.com -d www.mydomain.com -d api.mydomain.com<br># Enter your email address<br># Pick the option to redirect HTTP to HTTPS<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install PHP Modules and Composer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Slim uses the popular Composer module management system for PHP. I need a few PHP modules to get Composer to work with my Slim projects.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt install -y composer zip php-curl php-xml php-mbstring php-zip<br><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Load Project Files<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For day-to-day work on a PHP\/Slim project, I use a regular, unprivileged user account. I set up a new account with the <code>adduser<\/code> command. In this example the username <code><em>vern<\/em><\/code> is just an example. Select any username you want.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">adduser <em>vern<\/em><br># Select a strong password<br># Complete the \"Full Name\" field<br># Hit Enter for the remaining prompts<br><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, I need to impersonate the new user and load the project files from GitHub (or wherever I have my repository) into the project directory. After that I bring in all the dependent modules by running Composer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this example, I start a new Slim project called <code>myproject<\/code> using the Slim Skeleton repository.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ~<em>vern<\/em><br>su <em>vern<\/em><br>git clone https:\/\/github.com\/slimphp\/Slim-Skeleton.git myproject<br>cd myproject<br>composer install<br>exit<br><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The last step in developer account preparation is to give Apache ownership of the log directory. Change <code><em>vern<\/em><\/code><em> <\/em>to your developer account name.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">chown www-data:www-data \/home\/<em>vern<\/em>\/myproject\/logs<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Configure Apache for Slim<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Edit the Apache SSL configuration file that was generated by Certbot:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vi \/etc\/apache2\/sites-enabled\/000-default-le-ssl.conf<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The contents should like like this.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;IfModule mod_ssl.c&gt;<br>&lt;VirtualHost *:443&gt;<br>\tServerAdmin webmaster@localhost<br>\tDocumentRoot \/home\/vernonkeenan\/public_html\/cms<br>\tErrorLog ${APACHE_LOG_DIR}\/error.log<br>\tCustomLog ${APACHE_LOG_DIR}\/access.log combined<br>ServerName api.mydomain.com<br>SSLCertificateFile \/etc\/letsencrypt\/live\/api.mydomain.com\/fullchain.pem<br>SSLCertificateKeyFile \/etc\/letsencrypt\/live\/api.mydomain.com\/privkey.pem<br>Include \/etc\/letsencrypt\/options-ssl-apache.conf<br>&lt;\/VirtualHost&gt;<br>&lt;\/IfModule&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Change the DocumentRoot directive to point to the project&#8217;s public directory.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">DocumentRoot \/home\/vern\/myproject\/public<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following &lt;Directory&gt; directive before the &lt;\/VirtualHost&gt; tag.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;Directory \"\/home\/vern\/myproject\/public\"&gt;<br>&nbsp;  Options Indexes FollowSymLinks MultiViews<br>&nbsp; &nbsp;AllowOverride all<br>&nbsp; &nbsp;Require all granted<br>&nbsp; &nbsp;&lt;IfModule mod_rewrite.c&gt;<br>&nbsp; &nbsp;  RewriteEngine on<br>&nbsp; &nbsp; &nbsp; RewriteCond %{REQUEST_FILENAME} !-f<br>&nbsp; &nbsp; &nbsp;  RewriteRule ^(.*)$ index.php?_url=\/$1 [QSA,L]<br>&nbsp; &nbsp;&lt;\/IfModule&gt;<br>&lt;\/Directory&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, your&nbsp;<code>000-default-le-ssl.conf<\/code> file should look like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;IfModule mod_ssl.c&gt;<br>&lt;VirtualHost *:443&gt;<br>ServerAdmin webmaster@localhost<br>DocumentRoot \/home\/vern\/myproject\/public<br>ErrorLog ${APACHE_LOG_DIR}\/error.log<br>CustomLog ${APACHE_LOG_DIR}\/access.log combined<br>ServerName api.telnexus.com<br>SSLCertificateFile \/etc\/letsencrypt\/live\/api.mydomain.com\/fullchain.pem<br>SSLCertificateKeyFile \/etc\/letsencrypt\/live\/api.mydomain.com\/privkey.pem<br>Include \/etc\/letsencrypt\/options-ssl-apache.conf<br>&lt;Directory \"\/home\/vern\/myproject\/public\"&gt;<br>&nbsp;&nbsp; Options Indexes FollowSymLinks MultiViews<br>&nbsp;&nbsp; AllowOverride all<br>&nbsp;&nbsp; Require all granted<br>&nbsp;&nbsp; &lt;IfModule mod_rewrite.c&gt;<br>&nbsp;&nbsp; &nbsp; RewriteEngine on<br>&nbsp;&nbsp; &nbsp; RewriteCond %{REQUEST_FILENAME} !-f<br>&nbsp;&nbsp; &nbsp; RewriteRule ^(.*)$ index.php?_url=\/$1 [QSA,L]<br>&nbsp;&nbsp; &lt;\/IfModule&gt;<br>&lt;\/Directory&gt;<br>&lt;\/VirtualHost&gt;<br>&lt;\/IfModule&gt;<br><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Save and restart Apache.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apache2ctl restart<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Bask In The Glory!<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Fire up your browser and go to <code>https:\/\/api.mydomain.com\/<\/code> and you should see the Slim default page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use Slim, a lightweight PHP framework for creating HTTP applications and APIs using &#8220;routes.&#8221; Here&#8217;s my formula for deploying my Slim app on Ubuntu 18.04 with PHP 7.2. This&hellip;<\/p>\n","protected":false},"author":1,"featured_media":95,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[7],"tags":[64],"post_series":[],"class_list":["post-65","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","tag-tips","entry","has-media"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.2 (Yoast SEO v22.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Start a PHP 7.2 Slim Project on Ubuntu 18.04 - SalesforceDevops.net<\/title>\n<meta name=\"description\" content=\"Here is my formula for getting a PHP 7.2 project using Slim on the Ubuntu 18.04 operating system. Uses Certbot to simplify the use of a free SSL cert.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Start a PHP 7.2 Slim Project on Ubuntu 18.04 - SalesforceDevops.net\" \/>\n<meta property=\"og:description\" content=\"Here is my formula for getting a PHP 7.2 project using Slim on the Ubuntu 18.04 operating system. Uses Certbot to simplify the use of a free SSL cert.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:site_name\" content=\"SalesforceDevops.net\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/salesforcedevopsnet\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-20T05:27:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-30T21:47:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"369\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Vernon Keenan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@salesforcedevop\" \/>\n<meta name=\"twitter:site\" content=\"@salesforcedevop\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vernon Keenan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/\"},\"author\":{\"name\":\"Vernon Keenan\",\"@id\":\"https:\/\/cms.salesforcedevops.net\/#\/schema\/person\/ac094823465a60be4f47d7321ed7ce04\"},\"headline\":\"Start a PHP 7.2 Slim Project on Ubuntu 18.04\",\"datePublished\":\"2018-10-20T05:27:53+00:00\",\"dateModified\":\"2021-05-30T21:47:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/\"},\"wordCount\":539,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/cms.salesforcedevops.net\/#organization\"},\"image\":{\"@id\":\"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg\",\"keywords\":[\"Tips\"],\"articleSection\":[\"How To\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/#respond\"]}],\"copyrightYear\":\"2018\",\"copyrightHolder\":{\"@id\":\"https:\/\/cms.salesforcedevops.net\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/\",\"url\":\"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/\",\"name\":\"Start a PHP 7.2 Slim Project on Ubuntu 18.04 - SalesforceDevops.net\",\"isPartOf\":{\"@id\":\"https:\/\/cms.salesforcedevops.net\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg\",\"datePublished\":\"2018-10-20T05:27:53+00:00\",\"dateModified\":\"2021-05-30T21:47:06+00:00\",\"description\":\"Here is my formula for getting a PHP 7.2 project using Slim on the Ubuntu 18.04 operating system. Uses Certbot to simplify the use of a free SSL cert.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/#primaryimage\",\"url\":\"https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg\",\"contentUrl\":\"https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg\",\"width\":400,\"height\":369,\"caption\":\"Slim screenshot\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cms.salesforcedevops.net\/#website\",\"url\":\"https:\/\/cms.salesforcedevops.net\/\",\"name\":\"SalesforceDevops.net\",\"description\":\"Elevating Salesforce Devops with Insights and Innovation\",\"publisher\":{\"@id\":\"https:\/\/cms.salesforcedevops.net\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cms.salesforcedevops.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cms.salesforcedevops.net\/#organization\",\"name\":\"SalesforceDevops.net\",\"url\":\"https:\/\/cms.salesforcedevops.net\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cms.salesforcedevops.net\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/origin.salesforcedevops.net\/wp-content\/uploads\/2021\/04\/logo-horiz-325.jpg\",\"contentUrl\":\"https:\/\/origin.salesforcedevops.net\/wp-content\/uploads\/2021\/04\/logo-horiz-325.jpg\",\"width\":325,\"height\":101,\"caption\":\"SalesforceDevops.net\"},\"image\":{\"@id\":\"https:\/\/cms.salesforcedevops.net\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/salesforcedevopsnet\",\"https:\/\/twitter.com\/salesforcedevop\",\"https:\/\/www.linkedin.com\/in\/vernonkeenan\",\"https:\/\/www.youtube.com\/channel\/UCOgOn9rD5gyXSOmV7-Q0n7g\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/cms.salesforcedevops.net\/#\/schema\/person\/ac094823465a60be4f47d7321ed7ce04\",\"name\":\"Vernon Keenan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cms.salesforcedevops.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/cms.salesforcedevops.net\/wp-content\/wphb-cache\/gravatar\/09b\/09bd30f3ca2e049fbd8b9313ef5a41aex96.jpg\",\"contentUrl\":\"https:\/\/cms.salesforcedevops.net\/wp-content\/wphb-cache\/gravatar\/09b\/09bd30f3ca2e049fbd8b9313ef5a41aex96.jpg\",\"caption\":\"Vernon Keenan\"},\"description\":\"Vernon Keenan (LinkedIn) works as a senior information technology industry consultant based in Oakland, California. He earned his B.Sc. in Biomedical Engineering at Northwestern University where he programmed a PDP-8 with punched paper tape. In his 34-year-long career he has been a teacher, SPSS programmer, database administrator, clinical researcher, technology journalist, product marketing manager, market researcher, management consultant, and industry analyst. Most recently he is a telecom operator, cloud architect, Go devops engineer and Salesforce Developer\/Architect. For inquiries about Salesforce strategy briefings or solution architect work please contact Vern directly at +1-510-679-1900 or vern@vernonkeenan.com.\",\"sameAs\":[\"https:\/\/ceres-gw.tnxs.net\",\"https:\/\/linkedin.com\/in\/vernonkeenan\",\"https:\/\/twitter.com\/salesforcedevop\"],\"url\":\"https:\/\/cms.salesforcedevops.net\/index.php\/author\/vern\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Start a PHP 7.2 Slim Project on Ubuntu 18.04 - SalesforceDevops.net","description":"Here is my formula for getting a PHP 7.2 project using Slim on the Ubuntu 18.04 operating system. Uses Certbot to simplify the use of a free SSL cert.","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:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/","og_locale":"en_US","og_type":"article","og_title":"Start a PHP 7.2 Slim Project on Ubuntu 18.04 - SalesforceDevops.net","og_description":"Here is my formula for getting a PHP 7.2 project using Slim on the Ubuntu 18.04 operating system. Uses Certbot to simplify the use of a free SSL cert.","og_url":"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/","og_site_name":"SalesforceDevops.net","article_publisher":"https:\/\/www.facebook.com\/salesforcedevopsnet","article_published_time":"2018-10-20T05:27:53+00:00","article_modified_time":"2021-05-30T21:47:06+00:00","og_image":[{"width":400,"height":369,"url":"https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg","type":"image\/jpeg"}],"author":"Vernon Keenan","twitter_card":"summary_large_image","twitter_creator":"@salesforcedevop","twitter_site":"@salesforcedevop","twitter_misc":{"Written by":"Vernon Keenan","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/#article","isPartOf":{"@id":"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/"},"author":{"name":"Vernon Keenan","@id":"https:\/\/cms.salesforcedevops.net\/#\/schema\/person\/ac094823465a60be4f47d7321ed7ce04"},"headline":"Start a PHP 7.2 Slim Project on Ubuntu 18.04","datePublished":"2018-10-20T05:27:53+00:00","dateModified":"2021-05-30T21:47:06+00:00","mainEntityOfPage":{"@id":"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/"},"wordCount":539,"commentCount":0,"publisher":{"@id":"https:\/\/cms.salesforcedevops.net\/#organization"},"image":{"@id":"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/#primaryimage"},"thumbnailUrl":"https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg","keywords":["Tips"],"articleSection":["How To"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/#respond"]}],"copyrightYear":"2018","copyrightHolder":{"@id":"https:\/\/cms.salesforcedevops.net\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/","url":"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/","name":"Start a PHP 7.2 Slim Project on Ubuntu 18.04 - SalesforceDevops.net","isPartOf":{"@id":"https:\/\/cms.salesforcedevops.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/#primaryimage"},"image":{"@id":"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/#primaryimage"},"thumbnailUrl":"https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg","datePublished":"2018-10-20T05:27:53+00:00","dateModified":"2021-05-30T21:47:06+00:00","description":"Here is my formula for getting a PHP 7.2 project using Slim on the Ubuntu 18.04 operating system. Uses Certbot to simplify the use of a free SSL cert.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cms.salesforcedevops.net\/index.php\/2018\/10\/20\/start-a-php-7-2-slim-project-on-ubuntu-18-04\/#primaryimage","url":"https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg","contentUrl":"https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg","width":400,"height":369,"caption":"Slim screenshot"},{"@type":"WebSite","@id":"https:\/\/cms.salesforcedevops.net\/#website","url":"https:\/\/cms.salesforcedevops.net\/","name":"SalesforceDevops.net","description":"Elevating Salesforce Devops with Insights and Innovation","publisher":{"@id":"https:\/\/cms.salesforcedevops.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cms.salesforcedevops.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cms.salesforcedevops.net\/#organization","name":"SalesforceDevops.net","url":"https:\/\/cms.salesforcedevops.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cms.salesforcedevops.net\/#\/schema\/logo\/image\/","url":"https:\/\/origin.salesforcedevops.net\/wp-content\/uploads\/2021\/04\/logo-horiz-325.jpg","contentUrl":"https:\/\/origin.salesforcedevops.net\/wp-content\/uploads\/2021\/04\/logo-horiz-325.jpg","width":325,"height":101,"caption":"SalesforceDevops.net"},"image":{"@id":"https:\/\/cms.salesforcedevops.net\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/salesforcedevopsnet","https:\/\/twitter.com\/salesforcedevop","https:\/\/www.linkedin.com\/in\/vernonkeenan","https:\/\/www.youtube.com\/channel\/UCOgOn9rD5gyXSOmV7-Q0n7g"]},{"@type":"Person","@id":"https:\/\/cms.salesforcedevops.net\/#\/schema\/person\/ac094823465a60be4f47d7321ed7ce04","name":"Vernon Keenan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cms.salesforcedevops.net\/#\/schema\/person\/image\/","url":"https:\/\/cms.salesforcedevops.net\/wp-content\/wphb-cache\/gravatar\/09b\/09bd30f3ca2e049fbd8b9313ef5a41aex96.jpg","contentUrl":"https:\/\/cms.salesforcedevops.net\/wp-content\/wphb-cache\/gravatar\/09b\/09bd30f3ca2e049fbd8b9313ef5a41aex96.jpg","caption":"Vernon Keenan"},"description":"Vernon Keenan (LinkedIn) works as a senior information technology industry consultant based in Oakland, California. He earned his B.Sc. in Biomedical Engineering at Northwestern University where he programmed a PDP-8 with punched paper tape. In his 34-year-long career he has been a teacher, SPSS programmer, database administrator, clinical researcher, technology journalist, product marketing manager, market researcher, management consultant, and industry analyst. Most recently he is a telecom operator, cloud architect, Go devops engineer and Salesforce Developer\/Architect. For inquiries about Salesforce strategy briefings or solution architect work please contact Vern directly at +1-510-679-1900 or vern@vernonkeenan.com.","sameAs":["https:\/\/ceres-gw.tnxs.net","https:\/\/linkedin.com\/in\/vernonkeenan","https:\/\/twitter.com\/salesforcedevop"],"url":"https:\/\/cms.salesforcedevops.net\/index.php\/author\/vern\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg",400,369,false],"thumbnail":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2-150x150.png",150,150,true],"medium":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2-300x277.png",300,277,true],"medium_large":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg",400,369,false],"large":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg",400,369,false],"1536x1536":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg",400,369,false],"2048x2048":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg",400,369,false],"lightbox":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg",400,369,false],"search_results":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2-125x125.jpg",125,125,true],"blog_entry":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg",400,369,false],"blog_post":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg",400,369,false],"blog_post_full":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg",400,369,false],"blog_related":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg",400,369,false],"gallery":["https:\/\/cms.salesforcedevops.net\/wp-content\/uploads\/2018\/10\/Screen-Shot-2018-10-19-at-10.23.32-PM-2.jpg",400,369,false]},"uagb_author_info":{"display_name":"Vernon Keenan","author_link":"https:\/\/cms.salesforcedevops.net\/index.php\/author\/vern\/"},"uagb_comment_info":0,"uagb_excerpt":"I use Slim, a lightweight PHP framework for creating HTTP applications and APIs using &#8220;routes.&#8221; Here&#8217;s my formula for deploying my Slim app on Ubuntu 18.04 with PHP 7.2. This&hellip;","_links":{"self":[{"href":"https:\/\/cms.salesforcedevops.net\/index.php\/wp-json\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cms.salesforcedevops.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cms.salesforcedevops.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cms.salesforcedevops.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cms.salesforcedevops.net\/index.php\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":1,"href":"https:\/\/cms.salesforcedevops.net\/index.php\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":2757,"href":"https:\/\/cms.salesforcedevops.net\/index.php\/wp-json\/wp\/v2\/posts\/65\/revisions\/2757"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cms.salesforcedevops.net\/index.php\/wp-json\/wp\/v2\/media\/95"}],"wp:attachment":[{"href":"https:\/\/cms.salesforcedevops.net\/index.php\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cms.salesforcedevops.net\/index.php\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cms.salesforcedevops.net\/index.php\/wp-json\/wp\/v2\/tags?post=65"},{"taxonomy":"post_series","embeddable":true,"href":"https:\/\/cms.salesforcedevops.net\/index.php\/wp-json\/wp\/v2\/post_series?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}