<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Meher Ullah Khan Raj on Medium]]></title>
        <description><![CDATA[Stories by Meher Ullah Khan Raj on Medium]]></description>
        <link>https://medium.com/@rajkhaan?source=rss-8ac674629f31------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UtRXPJIhaCqilyec9IMgtw.jpeg</url>
            <title>Stories by Meher Ullah Khan Raj on Medium</title>
            <link>https://medium.com/@rajkhaan?source=rss-8ac674629f31------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 10:44:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rajkhaan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AWS CloudWatch Alarms for Node.js Background Jobs: A Practical Setup]]></title>
            <link>https://rajkhaan.medium.com/aws-cloudwatch-alarms-for-node-js-background-jobs-a-practical-setup-94f59e06a7d7?source=rss-8ac674629f31------2</link>
            <guid isPermaLink="false">https://medium.com/p/94f59e06a7d7</guid>
            <category><![CDATA[cron-job-monitoring]]></category>
            <category><![CDATA[logging-and-monitoring]]></category>
            <dc:creator><![CDATA[Meher Ullah Khan Raj]]></dc:creator>
            <pubDate>Thu, 04 Dec 2025 17:13:37 GMT</pubDate>
            <atom:updated>2025-12-05T04:17:44.150Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SvFYLStT9O6cyGJQ" /><figcaption>Image generated by Bing with the model DALLE 3</figcaption></figure><p>A few months back, I had to keep waking up until midnight to monitor my cron job, which was running without failing. So I can get rid of production downtime, and nobody noticed until the next morning. Our cron job that automated some repetitive tasks had started failing, and by the time we fix it, I need to detect first and run the manual endpoint until we reach that optimised level.</p><p>That was my sign to sit down and properly configure AWS alarms finally. I was thinking through what we need to monitor and how to get notified when/before things go sideways.</p><p>Here’s what I ended up implementing:</p><h3>Log-Based Metric Filters</h3><p>This is where it gets interesting. CPU alarms are great, but they don’t tell you <em>why</em> something’s wrong. What I really needed was to know when my application was throwing errors, especially in those background jobs that don’t have a user staring at a screen waiting for a response.</p><p>CloudWatch Log Groups can do this, and it’s honestly underutilised.</p><p><strong>Here’s the setup:</strong> your application logs go to a CloudWatch Log Group (if you’re on ECS or others that support Log Group, this is probably already happening). You can then create a <strong>Metric Filter</strong> that scans those logs for specific patterns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*y4DqsWJ9OvYlfQQL63dpcA.png" /><figcaption>Log Groups</figcaption></figure><p><strong>Steps</strong>:</p><ul><li>Go to your Log Group,</li><li>Click on your <strong>ECS/service</strong> (e.g, ecs/my-api</li><li>Select Metric Filters and create one.</li><li>The filter pattern syntax is a bit weird at first, but it’s powerful.</li></ul><p>For catching errors, something like this works:</p><pre>Error From myGreatFunction</pre><p>Adjust based on how your app logs things, and then click on Test Pattern to verify your logs are there. if you&#39;re using a structured logger like pino or winston, you might filter on specific JSON fields.</p><p>Give your metric a name like ApplicationErrorCount under a namespace like MyApp/Errors.</p><p><strong>Now here’s the key part</strong>: After creating the metrics, select the metrics and click on Create Alarm to create an alarm for that metric.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YFjbk1cQk2fL3Xq14UbVEg.jpeg" /><figcaption>Metrics Funcionality</figcaption></figure><p><strong>SNS: Simple Notification Service: </strong>You need to create an SNS topic and then select that topic when you configure Alarm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PiNJ21rGJvnwOJBnFcKybA.png" /></figure><p>Create an Alarm the way you want on this new metric. I set mine to trigger if the error count is &gt;= 1 in 5 minutes. Sounds aggressive, but for cron jobs, even one error usually means the whole run failed. For high-traffic APIs, you might want a threshold or rate instead.</p><ul><li>Create Alarm</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f9HcgQkSgSodimL4bXHYGA.png" /><figcaption>Crete alarm</figcaption></figure><ul><li>Configure Alarm</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FTt9fuqByZj-ud1tOlydKQ.png" /><figcaption>Alarm Configuration</figcaption></figure><p><strong>Select send notification to</strong>: Here select your SNS topic that you created, and when the alarms are in an OK state, it will send a notification.</p><h3>Cron Job Specific Monitoring</h3><p>For scheduled tasks specifically, you can add more custom layers. Cron jobs log a specific message when they complete something, like successfully [CRON:inventory-sync] completed successfully.</p><p>This catches the silent failures that used to slip through.</p><h3>A Few Things</h3><p><strong>Test your alarms.</strong> Seriously. Set up the whole thing and manually test it to verify, inform stakeholders to check emails went to spam or not, if you are using email notification.</p><p><strong>Set up an OK action too.</strong> When the alarm goes back to normal, send a notification. Nothing worse than seeing an alert email and not knowing if it’s still happening or already resolved.</p><p><strong>Be specific with log patterns.</strong> If you attempt to match the other logs word “error”, then you will end up getting alerts every time another throws the same error.</p><h3>Wrapping Up</h3><p>You can also set a CPU alarm, but that’s very common and plenty of resources out there, but if you want can take a look at the official doc from <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/US_AlarmAtThresholdEC2.html">here</a>. It will help you catch a memory leak that was causing increased CPU pressure, and the log metric caught a third-party API timeout that was failing our nightly report generation.</p><p>Is it perfect? No. There’s more sophisticated stuff you can do. But for a Node-based app running scheduled jobs and APIs, this covers like 80% of what you actually need to know.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94f59e06a7d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Export Google Contacts using Node.js and People API]]></title>
            <link>https://rajkhaan.medium.com/export-google-contacts-using-node-js-and-people-api-662039ab6730?source=rss-8ac674629f31------2</link>
            <guid isPermaLink="false">https://medium.com/p/662039ab6730</guid>
            <category><![CDATA[contacts-export-example]]></category>
            <category><![CDATA[export-google-contacts]]></category>
            <category><![CDATA[people-api]]></category>
            <category><![CDATA[get-contacts-using-nodejs]]></category>
            <category><![CDATA[google-contacts-api]]></category>
            <dc:creator><![CDATA[Meher Ullah Khan Raj]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 16:56:35 GMT</pubDate>
            <atom:updated>2020-11-23T17:26:37.047Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/840/0*Ef6bYhBX-vzVNAMZ.png" /><figcaption><a href="https://raw.githubusercontent.com/raj-khan/nodejs-export-google-contacts/master/export-contacts.png">https://raw.githubusercontent.com/raj-khan/nodejs-export-google-contacts/master/export-contacts.png</a></figcaption></figure><p>Google Contacts API allows client applications to play with the user’s contacts. Contacts are stored in the user’s Google Account. To follow the article you can export your Google contacts into a JSON file.</p><h3>Prerequisites</h3><p>To run this quickstart, you need the following prerequisites:</p><ul><li>Node.js &amp; npm installed.</li><li>A Google account</li></ul><p>So let’s start step by step:-</p><p>Complete the steps described in the rest of these steps to create a simple Node.js command-line application that makes contacts export requests to the People API.</p><h3>Step 1: Turn on the People API</h3><p>Click <strong>Enable the People API</strong> button to create a new Cloud Platform project and automatically enable the People API. or simply follow the steps:-</p><ol><li>Enter a new project name or use the default name, I prefer the default name;</li><li>Click <strong>Next</strong>;</li><li>Select Web server or Desktop App (Prefer: Web Server)</li><li>Pass a redirect URL;</li><li>In the resulting dialog click <strong>DOWNLOAD CLIENT CONFIGURATION</strong> and save the file credentials.json to your working directory.</li></ol><h3>Step 2: Install the client library</h3><p>Run the following commands to install the libraries using npm:</p><pre>npm install googleapis@39 --save</pre><h3>Step 3: Set up the sample</h3><p>Create a file named main.js in your working directory and copy in the following code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd4efb7f563faa2b69c98674fe0947b8/href">https://medium.com/media/cd4efb7f563faa2b69c98674fe0947b8/href</a></iframe><h3>Step 4: Change your credentials.json file</h3><p>Go to <strong>credentials.json</strong> file see the initial line of this file, replace web by installed or you will get an error.</p><h3>Step 5: Run the sample</h3><p>Run the sample using the following command:</p><pre>node main.js</pre><p>The first time you run the sample, it will prompt you to authorize access:</p><ol><li>Browse to the provided URL in your web browser.</li></ol><p>If you are not already logged into your <strong>Google account</strong>, you will be prompted to log in. If you are logged into <strong>multiple Google accounts</strong>, you will be asked to <strong>select one account</strong> to use for <strong>authorization</strong>.</p><p>If you don’t have a browser on the machine running the code, and you’ve selected “Desktop app” when creating the OAuth client, you can browse to the URL provided on another machine, and then copy the authorization code back to the running sample.</p><p>2. Click the <strong>Accept/Allow</strong> button.</p><p>3. Copy the code you’re given, paste it into the command-line prompt, and press <strong>Enter</strong>.</p><p>If you do not see any <strong>Code</strong> then check the browser URL where you can see a parameter called <strong>code=’something’</strong> copy the code before <strong>&amp;</strong> sign, because that was another parameter.</p><p>After this, The file <strong>token.json</strong> stores the user’s access and refresh tokens, and is created automatically when the authorization flow completes for the first time. Load previously authorized token from a file, if it exists.</p><p>4. <strong>Paste</strong> the <strong>code</strong> where asked in your terminal. You will see a result printed in your terminal which is Contacts Name &amp; Emails for <strong>10</strong> contacts by <strong>default</strong>.</p><p>5. Now copy the main.js code into your index.js file.</p><p>6. You’re all set, enjoy 🚀</p><h3>Conclusion</h3><p>In this article, I just export all contacts, If you need you can do more things like the update, delete user contacts. You will find the Google API Client for Node.js documentation in the further reading section.</p><p>In People API you can use your preferred languages:-<br><strong>Supported Languages:</strong><br> → Java<br> → PHP<br> → Node.js<br> → Python<br> → Ruby</p><h4>Further reading</h4><ul><li><a href="https://github.com/google/google-api-nodejs-client/#google-apis-nodejs-client">Google APIs Client for Node.js documentation</a>.</li><li><a href="https://github.com/raj-khan/nodejs-export-google-contacts">https://github.com/raj-khan/nodejs-export-google-contacts</a></li></ul><ul><li><a href="https://medium.com/@rajkhan.co/configuring-nginx-php-mysql-phpmyadmin-on-ubuntu-20-04-a-to-z-with-project-deployment-cf47bd3d1715">Configuring Nginx, PHP, MySQL, PHPMyAdmin on Ubuntu 20.04 (A to Z) — with Project Deployment.</a></li><li><a href="https://medium.com/@rajkhan.co/nginx-apache2-configuration-for-codeigniter-444872ff6ab2">Nginx, Apache2 Configuration for CodeIgniter</a></li><li><a href="https://medium.com/@rajkhan.co/laragon-the-best-alternative-of-the-xampp-server-b0444720b8b6">Laragon — The best alternative of the Xampp server!</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=662039ab6730" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuring Nginx, PHP, MySQL, PHPMyAdmin on Ubuntu 20.04 (A to Z) — with Project Deployment.]]></title>
            <link>https://rajkhaan.medium.com/configuring-nginx-php-mysql-phpmyadmin-on-ubuntu-20-04-a-to-z-with-project-deployment-cf47bd3d1715?source=rss-8ac674629f31------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf47bd3d1715</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[phpmyadmin]]></category>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[Meher Ullah Khan Raj]]></dc:creator>
            <pubDate>Mon, 07 Sep 2020 08:43:54 GMT</pubDate>
            <atom:updated>2020-09-27T12:00:54.869Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vbwYvnG2xYpZxTUrDOEADA.jpeg" /><figcaption>Image collect from <a href="https://ubuntu.tutorials24x7.com/">https://ubuntu.tutorials24x7.com/</a></figcaption></figure><h3>Configuring Nginx, PHP, MySQL, PHPMyAdmin on Ubuntu 20.04 (A to Z) — with Project Deployment.</h3><p>Hello! You see this post because you want to set up your server through installing Nginx, PHP, MySQL, &amp; PHPMyAdmin on Ubuntu Machine.</p><blockquote>“You can find many resources but in this article, you will see a complete solution like <strong>Max file upload and Post size, Request Entity Too Large </strong>problems.”</blockquote><p>Ok here you go, I will giving you a complete solution to run your PHP project from start.</p><p>I will show you how to set up a Project on this server also you will find how can you use your Domain instead of IP address to use your application.</p><p>If you want to set up a VPS server then you can use <strong>KVM Console </strong>for installation purposes or if you want to use your local machine then use the terminal and ignore <strong>VPS generate SSH key &amp; Login Section</strong>. To use your terminal instead of <strong>KVM Console </strong>follow the <strong>VPS generate SSH key &amp; Login Section.</strong></p><h3><strong>VPS generate SSH key &amp; Login:</strong></h3><p>You have to generate an ssh key to use your terminal instead of the server’s <strong>KVM Console </strong>then type the following command.</p><pre>ssh-keygen -R &quot;your_ip_address&quot;</pre><p>After this, you have to log in to your server, type the following command. After that, you will be asking for one question simply answer by typing ‘yes’.</p><pre>ssh root@your_ip_address</pre><p>It will be asked for your root password which is you find in the <strong>‘Login data’ </strong>section of<strong> Server Features </strong>in your server as root initial password. Enter the password &amp; login.</p><p>If you use your local machine simply follow the next step.</p><h3>Update Via Command Line:</h3><p>Now, update your machine by typing following the command line.</p><pre>sudo apt update</pre><h3>Install Nginx:</h3><p>The “-y” in the end automatically enters “yes”.</p><pre>sudo apt install nginx -y</pre><p>Check whether it’s running or not by typing the following command line &amp; press Q to exit.</p><pre>systemctl status nginx</pre><p>Check your Server by your IP ADDRESS. You will see the first page of Nginx which means you finished up your first step.</p><pre>http://your_ip_address</pre><h3>Installing PHP and MariaDB:</h3><p>Install the PHP update version and all the important plugins and check the server status. To paste this command use Shift+Insert keys.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/757c1e755ce888da292bf27b9619ec32/href">https://medium.com/media/757c1e755ce888da292bf27b9619ec32/href</a></iframe><p>Run the following command to check the status of PHP (Don’t forget to add your own version)</p><pre>systemctl status php7.4-fpm</pre><p>Import the MariaDB gpg key by this command below &amp; add it to your server.</p><p>To obtain the gpg key Visit the <a href="https://downloads.mariadb.org/mariadb/repositories/#mirror=rise"><strong>MariaDB</strong></a><strong> </strong>website.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bf8c1f1c82ba41ae213363fb85b777a9/href">https://medium.com/media/bf8c1f1c82ba41ae213363fb85b777a9/href</a></iframe><p>After the key is imported add the apt repository URL.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c7cb17073dac6387b82cca84df3a4b54/href">https://medium.com/media/c7cb17073dac6387b82cca84df3a4b54/href</a></iframe><p>And now Install the MariaDB Server by following commands. When you enter the <strong>mysql_secure_installation </strong>command then you will be asked for some questions:-</p><ul><li>The first question about your password simply skips this option by pressing the enter key.</li><li>After that, you will be asked to set up the root password you want then set a password by choosing a low-security option it will allow 8 digits simple password and then the rest of the questions answer y for yes.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/42dd2e212a4d4657ae6bd1e85bd8bc74/href">https://medium.com/media/42dd2e212a4d4657ae6bd1e85bd8bc74/href</a></iframe><h3>Install PHPMyAdmin:</h3><p>Install PHPMyAdmin using the following commands by extracting it to the /usr/share/phpmyadmin directory.</p><p>If you want to install the latest version of phpMyAdmin then visit the <a href="https://www.phpmyadmin.net/downloads/"><strong>phpMyAdmin</strong></a><strong> </strong>website.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0ba2ec36cf0242f18da7dca63da8850f/href">https://medium.com/media/0ba2ec36cf0242f18da7dca63da8850f/href</a></iframe><h4>Configure NGINX (Initially):</h4><p>Open the NGINX configuration <strong>(/etc/nginx/sites-available/default)</strong> file by entering the following command.</p><pre>sudo nano /etc/nginx/sites-available/default</pre><p>Now add the following line of code to the server block</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9b92bf874a960ac8f5700dc5413ed3c9/href">https://medium.com/media/9b92bf874a960ac8f5700dc5413ed3c9/href</a></iframe><p>Now test the configuration and restart the server.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e458093020935905884368576232aee/href">https://medium.com/media/4e458093020935905884368576232aee/href</a></iframe><p>Here we go! it’s time to test PHPMyAdmin.</p><pre>http://your_ip_address/phpmyadmin</pre><h3>Youtube Video:</h3><p>I also make a video for your batter understanding, please see this if you need.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FLKxSCqI-iAM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLKxSCqI-iAM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FLKxSCqI-iAM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cfa790e9e2f4d049b46158b165b1865f/href">https://medium.com/media/cfa790e9e2f4d049b46158b165b1865f/href</a></iframe><p>You have set up everything you need, Now if you want to deploy your project then follow the next steps, or If you don’t need it simply ignore this section.</p><p>In this section, I have added details configuration to deploy a CodeIgniter Project, this steps I do there:-</p><h4>Basic Configuration:</h4><ul><li><strong>Nginx Configuration (Nginx sites-available);</strong></li><li><strong>Apache Configuration;</strong></li></ul><h4>Bonus Section Configuration:</h4><ul><li><strong>PHP / Nginx: set max file upload and post size;</strong></li><li><strong>Solve Nginx error: 413 Request Entity Too Large;</strong></li></ul><p>To short this article I have written another article to solve the specific problem, If you want to read this article then visit here:</p><p><a href="https://medium.com/@rajkhan.co/nginx-apache2-configuration-for-codeigniter-444872ff6ab2">Nginx, Apache2 Configuration for CodeIgniter</a></p><h3>Bonus Section:</h3><p>After this Nginx, Apache2 Configuration, sometimes we want to use our application using our Domain instead of IP Address, But it needs some configuration in your <strong>Domain Name Server.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*GJFhYfV-Pgjc5BRHl7vqeQ.png" /><figcaption>Collect from <a href="https://neilpatel.com/">https://neilpatel.com/</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*5Z6uogwUFrSRpLlPMWCjtw.png" /></figure><p>Then click the<strong> ‘Add New Record’</strong> option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*rQYpUoYzL7rBM1pbg3lYcQ.png" /></figure><p>Select A Recordfor IPv4 and type @in the Host section then enter your IP Address in value option and save it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FurI5AO9lDnFzK8Tyh1U_A.png" /></figure><p>Now it takes a maximum of 30 minutes to access your Application using that Domain.</p><h3><strong>Conclusion:</strong></h3><p>I have to try to cover all topics in one article, hope it will be work for you, If anything wrong just put a comment, I will reply as soon as possible.</p><p>Happy Coding 😍</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf47bd3d1715" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nginx, Apache2 Configuration for CodeIgniter]]></title>
            <link>https://rajkhaan.medium.com/nginx-apache2-configuration-for-codeigniter-444872ff6ab2?source=rss-8ac674629f31------2</link>
            <guid isPermaLink="false">https://medium.com/p/444872ff6ab2</guid>
            <category><![CDATA[codeigniter]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[apache2]]></category>
            <category><![CDATA[ubuntu-20-04]]></category>
            <category><![CDATA[php-fpm]]></category>
            <dc:creator><![CDATA[Meher Ullah Khan Raj]]></dc:creator>
            <pubDate>Mon, 07 Sep 2020 07:20:57 GMT</pubDate>
            <atom:updated>2021-07-05T05:32:59.764Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*8Xqp22M9rFfPAk5qvpUUqA.png" /></figure><h3>Nginx, Apache Configuration for CodeIgniter!</h3><p>We can see many resources for initial setups such as Nginx, PHP, MySQL, and PHPMyAdmin installation on Ubuntu. But when we want to set up a PHP project such as CodeIgniter then we facing problems with <strong>Nginx &amp; Apache</strong> configuration.</p><p>To solve that problem I write this article also added this link in my <strong>Configuring Nginx, PHP, MySQL, PHPMyAdmin on Ubuntu 20.04 (A to Z) — with Project Deploy </strong>article.</p><p><a href="https://medium.com/@rajkhan.co/configuring-nginx-php-mysql-phpmyadmin-on-ubuntu-20-04-a-to-z-with-project-deployment-cf47bd3d1715">Configuring Nginx, PHP, MySQL, PHPMyAdmin on Ubuntu 20.04 (A to Z) — with Project Deployment.</a></p><p>Before starting this configuration you have to make sure you have complete the initial setup from the link I attached in the top section.</p><p>Most of the time we face problems to set up Nginx <strong>sites-available</strong> (<strong>/etc/nginx/sites-available/default) </strong>configuration, In this section, I will be showing the ultimate solution for your CodeIgniter project.</p><p>Follow the steps.</p><h4>Nginx Configuration (sites-available):</h4><p>Add the following lines of code to the server block. Replace all code of server block using the following lines.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/82a5475834b9f22e9c2b3e982900b1a0/href">https://medium.com/media/82a5475834b9f22e9c2b3e982900b1a0/href</a></iframe><p>After this, you have to restart the Nginx service by running the following command.</p><pre>service nginx restart</pre><p>Now you are complete the configuration for Nginx, Now you can use your CodeIgniter Application using your IP address.</p><pre>http://your_ip_address</pre><p>let’s follow the next section for Apache configuration.</p><h4>Apache Configuration:</h4><p>In the server block of the Nginx server, we rewrite the mode to use our CodeIgniter project using our IP Address, Now you can’t find your PHPMyAdmin using the URL.</p><pre>http://your_ip_address/phpmyadmin</pre><p>Because we create a symlink in the initial setup with <strong>/var/www/html. </strong>Now we have to change the symlink for our CodeIgniter project with that directory (<strong>/var/www/html/ci</strong>) by running the following command.</p><pre>ln -s /usr/share/phpmyadmin /var/www/html/ci</pre><p>Now you can access your PHPMyAdmin by this URL.</p><pre>http://your_ip_address/phpmyadmin</pre><h4>Bonus Section:</h4><p>Yes, It’s a bonus section for your apache configuration, sometimes for a big project, we have a large database, and we facing problems to import that database in our PHPMyAdmin.</p><p>Now I will show how you Import such a database in your server step by step.</p><h4>PHP / Nginx: set max file upload and post size:</h4><p>Firstly, you need to locate your php.ini file. In this example, our php.ini file is located in /etc/php/7.4/fpm/php.ini</p><pre>sudo nano /etc/php/7.4/fpm/php.ini</pre><p>In nano, press CTRL + W and search for upload_max_filesize and change the value to 80M (for 80 megabytes).</p><pre>upload_max_filesize = 80M</pre><p>Again search for post_max_size and change the value to 80M (for 80 megabytes).</p><pre>post_max_size = 80M</pre><p>Save file and exit. (Press CTRL+X, press Yand then press ENTER and Restart PHP FPM by running the command.</p><pre>service php7.4-fpm restart</pre><p>Now you can see in PHPMyAdmin the size updated, But In this case, you may need to update the <strong>Nginx Configuration</strong> file also.</p><p>Nginx Configuration to solve <strong>Nginx error: 413 Request Entity Too Large, </strong>follow the following step.</p><h4><strong>Nginx error: 413 Request Entity Too Large:</strong></h4><p>In case you may try to upload large files and are seeing this error, it means the <strong>client_max_body_size</strong> value is too low.</p><p>Open the Nginx configuration file by running this command.</p><pre>sudo nano /etc/nginx/nginx.conf</pre><p>If you have not found it here It may also be located in usr/local/nginx/conf/nginx.conf or /usr/local/et/nginx/nginx.conf</p><p>If you still can’t find it, try locate</p><pre>locate nginx.conf</pre><p>To save file and exit nano. (Press CTRL+X, press Yand then press ENTER and check that the Nginx config file is valid after saving.</p><pre>sudo nginx -t</pre><p>If valid, reload the Nginx service.</p><pre>sudo service nginx reload</pre><p>Now you are all set, you can Import a Large database to your server :).</p><p>Happy Coding 😍</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=444872ff6ab2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Laragon — The best alternative of the Xampp server!]]></title>
            <link>https://rajkhaan.medium.com/laragon-the-best-alternative-of-the-xampp-server-b0444720b8b6?source=rss-8ac674629f31------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0444720b8b6</guid>
            <category><![CDATA[xampp]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[local-server]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[laragon]]></category>
            <dc:creator><![CDATA[Meher Ullah Khan Raj]]></dc:creator>
            <pubDate>Tue, 05 May 2020 10:52:42 GMT</pubDate>
            <atom:updated>2020-09-27T05:40:56.389Z</atom:updated>
            <content:encoded><![CDATA[<h3>Laragon — The best alternative of the Xampp server!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/0*s4MoRa7VwTm4Ubok.jpg" /><figcaption>the best alternative of the Xampp server</figcaption></figure><p>Most PHP users use Xampp to run PHP on the local server. There are many alternatives to the Xampp server for Windows, Linux, and MAC OS.</p><p>In this blog, I will write in detail about <a href="https://laragon.org/docs/"><strong><em>Laragon</em></strong></a><strong><em> </em></strong>which currently supports Windows only.</p><p>But there are some Linux tools that let you run windows software on Linux. But beware, using such tools does not guarantee you seamless operation. <a href="https://www.lifewire.com/tools-to-run-windows-programs-in-linux-4120713"><strong><em>Here</em></strong></a><strong><em> </em></strong>are some tools that you can use.</p><p>Before start to describe all features you have to install it. First, <a href="https://laragon.org/download/"><strong><em>download</em></strong></a><strong><em> </em></strong>the full version, follow the installation process form <a href="https://laragon.org/docs/install.html"><strong><em>here</em></strong></a>.</p><p>Let’s discuss all features and find out why Laragon is the best alternative to Xampp.</p><h4><strong>**PHP VERSION SWITCH**</strong></h4><p>In Xampp for multiple PHP version have no option, If you want to use a different version then we have to install in a different folder. But In Laragon, you can switch the PHP version easily.</p><p>After clicking the right button you can see the PHP version list. If you want to add more PHP, Simply download the PHP from <a href="https://windows.php.net/"><strong><em>PHP for Windows</em></strong></a><strong><em> </em></strong><em>and click on the PHP version and Extract the on this directory.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*gEkVzu9a4iBL5PR_RAyXpg.png" /><figcaption>Switch PHP Version From Laragon</figcaption></figure><h4><strong>**BUILT-IN OPEN SOURCE DATABASE**</strong></h4><p>In Laragon, you can use the open-source Database Software.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*my9O1hc3dv8May-XeS7H7Q.png" /><figcaption>Laragon database</figcaption></figure><h4><strong>**BUILT-IN TERMINAL**</strong></h4><p>In Laragon, you can use the beautiful transparent multiple terminals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*jrgI6Sk07Saelw8xkWn8tQ.png" /><figcaption>Laragon terminal</figcaption></figure><h4><strong>**AUTO VIRTUAL HOST**</strong></h4><p>In Laragon, you can run the project using Virtual Host. By default, Laragon provides <strong>app.test </strong>domain but you can customize that like <strong>app.me</strong>. If you want to change go through settings icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*zq949-cJ0GONgqbuUkO-cw.png" /><figcaption>Auto virtual host in Laragon.</figcaption></figure><h4><strong>**QUICK APP**</strong></h4><p>In Laragon, you can use boilerplate to make a quick application like Wordpress, Laravel, Symfony, Drupal, Blank also custom app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*s0aKgrLRSZvJfOo4fTd8Wg.png" /><figcaption>create a quick app using Laragon</figcaption></figure><h4><strong>**MOREOVER**</strong></h4><p>Moreover, you can find out the tools menu, Preferences menu there are lots of simple built-in functions you can use. If you want more about Laragon go to the official websites and follow the <a href="https://laragon.org/docs/"><strong><em>Documentation</em></strong></a><strong><em>.</em></strong></p><h4>**CONCLUSION**</h4><p>What I shared in the Blog it’s from my experience. If anything wrong, please send your response.</p><p>Happy Coding 😍</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0444720b8b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Customize your own Image]]></title>
            <link>https://rajkhaan.medium.com/customize-your-own-image-b427a2eb5af9?source=rss-8ac674629f31------2</link>
            <guid isPermaLink="false">https://medium.com/p/b427a2eb5af9</guid>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[people-management]]></category>
            <dc:creator><![CDATA[Meher Ullah Khan Raj]]></dc:creator>
            <pubDate>Tue, 31 Mar 2020 12:40:29 GMT</pubDate>
            <atom:updated>2020-09-01T06:43:06.575Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z2gDRCzYiZSqG1xNGuSbWA.jpeg" /><figcaption>Life is beautiful</figcaption></figure><p>I was starting my internship as a Web Developer on February 1, 2017. Luckily I got some co-workers who always helping me in many ways. Since 2017, I learned many things about life, career, networking.</p><p>Today I want to discuss a very important topic which is too important for every people and I don’t know about it until one of my colleagues <a href="https://medium.com/u/c7216a7693be">Mehedi Hassan Sisir</a> tells me about it.</p><p>This topic comes via a story between us. One day my boss told me and my colleague to work next Friday but we have an issue. We have to attend a programming workshop on the same day. We decide first to attend the workshop, then we go to the office. After complete the workshop, we move to the office. Boss asked me why we are late? I answered <strong>I have some tasks to finish</strong>. The Boss starts to argue with me and simply he is not happy with me at that time.</p><p>Then <a href="https://medium.com/u/c7216a7693be">Mehedi</a> Bhai told me something I don’t know. He says Raj, <strong>You have to customize your own image</strong>. I said I don’t understand. Then he tells something which is changing my life. <strong>“Everybody has own image If someone thinks about you without your presence he saw an image that represents you”. </strong>How someone treats you it depends on what kind of image stored on his memory about you.</p><p>Now the question is how can I develop a better version of my own image? In 3 years I relate this <strong>image thing</strong> several times. And when I write a blog for the very first time in <a href="https://medium.com/u/504c7870fdb6">Medium</a> about this, then I should share some points to develop a better version of the <strong>Own Image</strong> from my point of view.</p><h3><strong>Think twice before you say something:</strong></h3><p>When you say something to someone no matter what you talking about you have to think about it how they react with it. For example, If I back to the previous point when my boss shows angry with me, He tells me <strong>“If I said to my boss, I’m late because I attend a Programming workshop which is very important for my office project and I can implement this thing then my boss’s memory will update my image”. </strong>But remember you have to honest, If you don’t it doesn’t work in the long run. <strong>“Your image and your honesty are like a coin”.</strong></p><h3>Don’t say anything which you can’t:</h3><p><strong><em>If you can’t it’s not a big deal, If you can’t but you told you can it’s a demotion of your image. </em></strong>For Example, I worked on the same company with the same boss till march 31, 2019. I told my boss before 3 or 4 days ago boss I have a workshop or seminar which is very important for my project so I can’t come office on this day or I will go early on this day, and it really works. And I also started work what I told him before attend the seminars or workshops. After that, he talked about me with my other colleagues. I attend many programming workshops and seminars and I share my experience with my boss and colleagues also till I left the company.</p><h3>Moreover:</h3><p>When I think about some people I saw an Image. It’s another way to update your own image. List your favorite persons, think why you like them, what they do with you or with someone? Now find yours.</p><h3>Conclusion:</h3><p>This is my first blog in <a href="https://medium.com/u/504c7870fdb6">Medium</a>, I’m not too good in English, what I share it’s from my point of view. If I mistake something, please send your response. Also, If this blog can be a good impact for anyone it belongs to him.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b427a2eb5af9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>