{"id":2,"date":"2022-06-25T02:00:20","date_gmt":"2022-06-25T02:00:20","guid":{"rendered":"http:\/\/raehaltech.com\/?page_id=2"},"modified":"2022-06-25T04:10:05","modified_gmt":"2022-06-25T04:10:05","slug":"sample-page","status":"publish","type":"page","link":"https:\/\/raehaltech.com\/index.php\/sample-page\/","title":{"rendered":"Back Online"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">After a bit of down time I have started to get my website back online.  I still need to sort out a theme and create some posts but the technical work is done.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My issues started because I had used a website host that gives you a free domain name when you sign up to host your website on their system.  I hosted my site on their system for a while but the editor was not very good.  I couldn&#8217;t make a website that I wanted.  I moved my website to another host.   This worked fine for a while but the original company decided you had have domain name and host services with them together or you had to move from their services.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I moved my DNS to a new company that primarily provides DNS services to lock down my domain names.  There was a bit of back and forth with tech support at the old provider and the new provider to get the process completed.  It was mostly making sure I really was who owned the domain names.  I didn&#8217;t want to get caught in a similar situation so I didn&#8217;t publish a new website right away.  After some testing I decided to go in a bit of a different direction.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I am not using a standard hosting provider.  I decided to build my own server in Google&#8217;s cloud (after some testing of various options) and set up my own LAMP (Linux, Apache, MySQL, and PHP) server.  I have used Linux for a lot of various projects so there is no administration issues that I anticipate and I am familiar with MySQL, Apache, and PHP.  Google offers several distributions of Linux and I ended up using Ubuntu Server 22.04 LTS.  I am most familiar with Debian varieties of Linux so I wanted to stay in that family.  I use Linux Mint and Kbuntu on a couple of my personal computers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are a lot of guides online that explain how to do this but I had to configure my LAMP server manually.  Normally you can install a package called &#8220;<em>tasksel<\/em>&#8221; and then use that install a &#8220;lamp-server&#8221; package.  <em>tasksel<\/em> just saves time by combining a lot of commands into an easy script.  The option seems to be missing from <em>tasksel<\/em> in the Google Linux image.  <em>tasksel<\/em> did give me a webserver option, as pictured below, but I am not sure what that would have done.  Normally LAMP Server is a listed option in the list when you don&#8217;t use the command line.  <em>tasksel<\/em> did install PHP plus some other packages when I used the traditional command but MySQL and Apache were missing.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"642\" height=\"386\" src=\"https:\/\/raehaltech.com\/wp-content\/uploads\/2022\/06\/putty_QDRRXK5J0f.png\" alt=\"\" class=\"wp-image-27\" srcset=\"https:\/\/raehaltech.com\/wp-content\/uploads\/2022\/06\/putty_QDRRXK5J0f.png 642w, https:\/\/raehaltech.com\/wp-content\/uploads\/2022\/06\/putty_QDRRXK5J0f-300x180.png 300w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After getting the packages installed I was able to configure everything.  Ultimately I am using Apache 2.x, MySQL 8.x, and PHP 8.1.  Even without the use of <em>tasksel <\/em>the manual integration was so easy as I just need to install a few packages using these two commands.  I am not sure I will use all the extra php modules but the apache mod and mysqli packages are a must.<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<ul class=\"wp-block-list\"><li>sudo apt install libapache2-mod-php<\/li><li>sudo apt install php-{curl,intl,zip,soap,xml,gd,mbstring,bcmath,common,mysqli}<\/li><\/ul>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">I also need a way to transfer files to and from the webserver so I added the package <strong>vsftpd<\/strong>.  I configured the software on Ubuntu and made sure it required SSL.  This process required creating a local user to log into the FTP server and making an SSL certificate for the requests.  Google Cloud doesn&#8217;t allow user\/password sign in by default, everything is done with SSH keys.  Once the host was ready I added firewall rules in the Google Cloud Dashboard under the VPC network area.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Everything is configured and working and that&#8217;s where this post comes in.  This will be the first addition to the new website.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After a bit of down time I have started to get my website back online. I still need to sort out a theme and create some posts&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-2","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/raehaltech.com\/index.php\/wp-json\/wp\/v2\/pages\/2","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/raehaltech.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/raehaltech.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/raehaltech.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/raehaltech.com\/index.php\/wp-json\/wp\/v2\/comments?post=2"}],"version-history":[{"count":1,"href":"https:\/\/raehaltech.com\/index.php\/wp-json\/wp\/v2\/pages\/2\/revisions"}],"predecessor-version":[{"id":28,"href":"https:\/\/raehaltech.com\/index.php\/wp-json\/wp\/v2\/pages\/2\/revisions\/28"}],"wp:attachment":[{"href":"https:\/\/raehaltech.com\/index.php\/wp-json\/wp\/v2\/media?parent=2"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}