<?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"><channel><title><![CDATA[Md Udoy Hasan's Blog - Learn, Code, Debug, Fix and Publish]]></title><description><![CDATA[Learn, code, debug, fix, and publish like a pro with Md Udoy Hasan. Stay up-to-date on the latest technology news, reviews, and expert insights. Join my newsletter today!]]></description><link>https://blog.udoyhasan.com</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1683993699752/jWZLMeSfr.png</url><title>Md Udoy Hasan&apos;s Blog - Learn, Code, Debug, Fix and Publish</title><link>https://blog.udoyhasan.com</link></image><generator>RSS for Node</generator><lastBuildDate>Wed, 13 May 2026 10:15:10 GMT</lastBuildDate><atom:link href="https://blog.udoyhasan.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to install OpenJDK 18 or JDK 18 on Kali Linux]]></title><description><![CDATA[By default, the Kali Linux ISO (2023.X) ships with OpenJDK 17, and some of the Kali Linux tools may require OpenJDK 18. But JDK 18 has reached its end of support. But no need to worry in this blog we will cover how you can install OpenJDK 18 also kno...]]></description><link>https://blog.udoyhasan.com/how-to-install-openjdk-18-or-jdk-18-on-kali-linux</link><guid isPermaLink="true">https://blog.udoyhasan.com/how-to-install-openjdk-18-or-jdk-18-on-kali-linux</guid><category><![CDATA[JDK18]]></category><category><![CDATA[Kali Linux]]></category><category><![CDATA[Java]]></category><category><![CDATA[hacking]]></category><category><![CDATA[hacking tools]]></category><dc:creator><![CDATA[MD UDOY HASAN]]></dc:creator><pubDate>Wed, 14 Feb 2024 21:30:31 GMT</pubDate><content:encoded><![CDATA[<p>By default, the Kali Linux ISO (2023.X) ships with OpenJDK 17, and some of the Kali Linux tools may require OpenJDK 18. But JDK 18 has reached its end of support. But no need to worry in this blog we will cover how you can install OpenJDK 18 also known as JAVA 18 on your running Kali Linux Machine. So let's start.</p>
<p><strong>Step 1: Open your terminal and log in as a root user</strong></p>
<p>Simply, open your terminal and log in as the root user in your Kali Linux machine by using the following command:</p>
<pre><code class="lang-bash">sudo su -
</code></pre>
<p><strong>Step 2: Download the JDK 18 Release</strong></p>
<p>All deprecated JDK releases can be found on the official <a target="_blank" href="https://jdk.java.net/archive/">JDK Archive</a>. From there select <em>18.0.2 (build 18.0.2+9)</em> as the version and download the <em>Linux/x64 64-bit tar.gz</em> file. You can use wget for it.</p>
<pre><code class="lang-bash">wget https://download.java.net/java/GA/jdk18.0.2/f6ad4b4450fd4d298113270ec84f30ee/9/GPL/openjdk-18.0.2_linux-x64_bin.tar.gz
</code></pre>
<p><strong>Step: 3 Extract the file</strong></p>
<p>Now once your JDK 18.0.2 has been successfully downloaded extract the file using the following command.</p>
<pre><code class="lang-bash">tar xvzf openjdk-18.0.2_linux-x64_bin.tar.gz
</code></pre>
<p><strong>Step 4: Confirm the version of the new JVM using the</strong></p>
<p>Then you should verify the version of this new JVM.</p>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> jdk-18.0.2/bin
./java -version
</code></pre>
<p>You should then get an output like this.</p>
<pre><code class="lang-plaintext">openjdk version "18.0.2" 2022-07-19
OpenJDK Runtime Environment (build 18.0.2+9-61)
OpenJDK 64-Bit Server VM (build 18.0.2+9-61, mixed mode, sharing)
</code></pre>
<p><strong>Step 5: Move the JDK folder to the preferred location</strong></p>
<p>Now again change your directory and move the JDK 18 folder to the preferred location.</p>
<pre><code class="lang-bash"><span class="hljs-built_in">cd</span> ../../
mv jdk-18.0.2 /usr/lib/jvm/jdk-18.0.2
</code></pre>
<p><strong>Step 6: Export the JAVA_PATH</strong></p>
<p>Once you are all done our final step is to export the Java path to our <code>.bashrc</code> or <code>.zshrc</code> file.</p>
<p>Note: If you have <code>.zshrc</code> then no need to export it to the <code>.bashrc</code>. Nowadays all new Kali Linux installation comes with ZSH so you only need to update <code>.zshrc</code> .</p>
<pre><code class="lang-bash">nano .zshrc

<span class="hljs-comment"># If you don't have .zshrc then only</span>
nano .bashrc
</code></pre>
<p>Then move your cursor to the bottom of the file and paste this 2 there.</p>
<pre><code class="lang-bash"><span class="hljs-built_in">export</span> JAVA_HOME=<span class="hljs-string">"/usr/lib/jvm/jdk-18.0.2"</span>
<span class="hljs-built_in">export</span> PATH=<span class="hljs-string">"<span class="hljs-variable">$JAVA_HOME</span>/bin:<span class="hljs-variable">$PATH</span>"</span>
</code></pre>
<p>Then save it using <code>Ctrl+S</code> and then close it using <code>Ctrl + X</code> .</p>
<p>Now you can refresh the path for the terminal.</p>
<pre><code class="lang-bash"><span class="hljs-built_in">source</span> ~/.zshrc

<span class="hljs-comment"># If you don't have .zshrc then only</span>
<span class="hljs-built_in">source</span> ~/.bashrc
</code></pre>
<p>Now we are done installing JDK 18 for the root user now we need to do it for the regular user.</p>
<p>For that first exit as the root user. Run this command on your terminal.</p>
<pre><code class="lang-bash"><span class="hljs-built_in">exit</span>
</code></pre>
<p>Then again open <code>.zshrc</code> or <code>.bashrc</code> and put the same thing there.</p>
<pre><code class="lang-bash">nano .zshrc

<span class="hljs-comment"># If you don't have .zshrc then only</span>
nano .bashrc
</code></pre>
<p>In the file bottom add:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">export</span> JAVA_HOME=<span class="hljs-string">"/usr/lib/jvm/jdk-18.0.2"</span>
<span class="hljs-built_in">export</span> PATH=<span class="hljs-string">"<span class="hljs-variable">$JAVA_HOME</span>/bin:<span class="hljs-variable">$PATH</span>"</span>
</code></pre>
<p>Now you can refresh the path for the terminal.</p>
<pre><code class="lang-bash"><span class="hljs-built_in">source</span> ~/.zshrc

<span class="hljs-comment"># If you don't have .zshrc then only</span>
<span class="hljs-built_in">source</span> ~/.bashrc
</code></pre>
<p>Now we are all done and you can now close your terminal and restart it and you will have JDK 18 used by default on your terminal. And you can verify it by just running <code>java -version</code> or <code>sudo java -version</code> on your terminal.</p>
<p>So that's all if this article helped then please like and share this article with your friends and if you need any help or you are stuck then comment with your problem and hopefully I'll provide you with a solution.</p>
<p>If you want a video tutorial then also please do comment and I'll try to make it.</p>
]]></content:encoded></item><item><title><![CDATA[The Top 5 CSS Frameworks for ReactJS: A Comprehensive Guide to Enhance Your User Interfaces]]></title><description><![CDATA[ReactJS has emerged as one of the most popular JavaScript libraries for building user interfaces, and its flexibility and component-based architecture have made it a go-to choice for developers worldwide. While ReactJS offers powerful capabilities fo...]]></description><link>https://blog.udoyhasan.com/the-top-5-css-frameworks-for-reactjs-a-comprehensive-guide-to-enhance-your-user-interfaces</link><guid isPermaLink="true">https://blog.udoyhasan.com/the-top-5-css-frameworks-for-reactjs-a-comprehensive-guide-to-enhance-your-user-interfaces</guid><category><![CDATA[Ui/Ux Design]]></category><category><![CDATA[Tailwind CSS]]></category><category><![CDATA[Bootstrap]]></category><category><![CDATA[material ui]]></category><category><![CDATA[ReactJS CSS frameworks]]></category><dc:creator><![CDATA[MD UDOY HASAN]]></dc:creator><pubDate>Sat, 08 Jul 2023 21:31:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1688851913448/69c7779d-43de-4b91-b2fc-eb810614d157.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>ReactJS has emerged as one of the most popular JavaScript libraries for building user interfaces, and its flexibility and component-based architecture have made it a go-to choice for developers worldwide. While ReactJS offers powerful capabilities for managing the UI logic, integrating a CSS framework can significantly enhance the design and aesthetics of your application. In this blog post, we will explore the top five CSS frameworks that seamlessly integrate with ReactJS and empower developers to create stunning user interfaces.</p>
<h3 id="heading-1-material-uihttpsmuicom"><a target="_blank" href="https://mui.com/">1. Material-UI</a></h3>
<p><img src="https://codedthemes.com/wp-content/uploads/2022/06/MUI-Template-Banner.svg" alt="Material UI Templates - CodedThemes" class="image--center mx-auto" /></p>
<p>Material-UI is a widely used CSS framework for ReactJS, offering a rich set of customizable components based on Google's Material Design principles. It provides a comprehensive library of UI components, including buttons, cards, navigation bars, form elements, and more, all styled according to the Material Design guidelines.</p>
<p><strong>Pros</strong></p>
<ul>
<li><p>Comprehensive library: Material-UI offers an extensive collection of pre-built components that cover almost all UI requirements, saving developers valuable time and effort.</p>
</li>
<li><p>Responsiveness and accessibility: Material-UI emphasizes responsive design and accessibility, ensuring that your application looks great and functions well across different devices and platforms.</p>
</li>
<li><p>Theming and customization: Material-UI provides theming support, allowing you to easily customize the appearance of your application to match your brand or personal style.</p>
</li>
</ul>
<p><strong>Cons</strong></p>
<ul>
<li><p>Large bundle size: Material-UI's extensive library of components and styles can result in a large bundle size, which may impact the performance of your application.</p>
</li>
<li><p>Steeper learning curve: While Material-UI offers a wide range of customization options, mastering the framework's more advanced customization features can require some additional learning and practice.</p>
</li>
</ul>
<p><strong>Use cases</strong></p>
<ul>
<li><p>Material-UI is ideal for projects that require a visually appealing and modern user interface following Google's Material Design guidelines.</p>
</li>
<li><p>It is well-suited for applications that need a wide range of customizable components and a responsive layout.</p>
</li>
<li><p>Material-UI is a great choice for building web applications, mobile apps, or any project where consistent styling and theming are crucial.</p>
</li>
</ul>
<h3 id="heading-2-bootstraphttpsgetbootstrapcom"><a target="_blank" href="https://getbootstrap.com/">2. Bootstrap</a></h3>
<p><img src="https://getbootstrap.com/docs/5.3/assets/brand/bootstrap-social.png" alt class="image--center mx-auto" /></p>
<p>Bootstrap is a popular CSS framework that has gained immense popularity due to its extensive collection of pre-built components and responsive grid system. While initially designed for use with jQuery, it can be seamlessly integrated into ReactJS applications using the react-bootstrap library.</p>
<p><strong>Pros</strong></p>
<ul>
<li><p>The abundance of components: Bootstrap provides a vast selection of UI components, including navigation bars, modals, forms, and more. These pre-built components enable developers to quickly create attractive and functional user interfaces.</p>
</li>
<li><p>Responsive grid system: Bootstrap's responsive grid system makes it easy to create layouts that adapt to different screen sizes, ensuring a consistent user experience across devices.</p>
</li>
<li><p>Thriving community and ecosystem: Bootstrap boasts a large and active community, resulting in excellent documentation, support, and a wealth of third-party libraries and themes.</p>
</li>
</ul>
<p><strong>Cons</strong></p>
<ul>
<li><p>Tight coupling with HTML structure: Bootstrap's components often require specific HTML structures, making customization challenging if you need to deviate from Bootstrap's predefined styles.</p>
</li>
<li><p>Limited customization options: While Bootstrap offers some customization through CSS classes and variables, it may not provide as much flexibility for creating unique and highly tailored designs.</p>
</li>
</ul>
<p><strong>Use cases</strong></p>
<ul>
<li><p>Bootstrap is ideal for projects that need a robust set of pre-built components and a responsive grid system.</p>
</li>
<li><p>It is suitable for applications with complex layouts, such as e-commerce platforms, content management systems, or admin dashboards.</p>
</li>
<li><p>Bootstrap's large community and extensive ecosystem make it an excellent choice for projects where community support and third-party extensions are important.</p>
</li>
</ul>
<h3 id="heading-3-semantic-ui-reacthttpsreactsemantic-uicom"><a target="_blank" href="https://react.semantic-ui.com/">3. Semantic UI React</a></h3>
<p><img src="https://audviklabs.com/wp-content/uploads/2022/09/3C3A8E4C-1CF8-45D4-9B8E-3D0C05C9BD68.png" alt="Semantic UI and its Uses - Audvik Labs" class="image--center mx-auto" /></p>
<p>Semantic UI React combines the elegance of Semantic UI's design language with the power of ReactJS, providing an intuitive and developer-friendly CSS framework. It offers a vast selection of customizable components with semantic class names, making it easier to understand and maintain your codebase.</p>
<p><strong>Pros</strong></p>
<ul>
<li><p>Semantic class names: Semantic UI React uses intuitive class names that describe the purpose and meaning of each component, enhancing code readability and making it easier to style and customize.</p>
</li>
<li><p>Extensive component library: Semantic UI React provides a comprehensive library of components, ranging from simple elements like buttons and inputs to more complex elements like dropdowns and accordions.</p>
</li>
<li><p>Concise and expressive syntax: The concise syntax of Semantic UI React allows for faster and more intuitive development, making it an ideal choice for both beginners and experienced developers.</p>
</li>
</ul>
<p><strong>Cons</strong></p>
<ul>
<li><p>Smaller community: While Semantic UI React has a dedicated user base, it may have a smaller community compared to some of the other frameworks, which can result in fewer available resources and third-party extensions.</p>
</li>
<li><p>A limited number of third-party libraries and themes: While Semantic UI React offers a solid set of components, the availability of third-party libraries and themes may be more limited compared to other frameworks.</p>
</li>
</ul>
<p><strong>Use cases</strong></p>
<ul>
<li><p>Semantic UI React is a good fit for projects that prioritize code readability and maintainability.</p>
</li>
<li><p>It is well-suited for applications with complex UI requirements, where having a comprehensive library of components is important.</p>
</li>
<li><p>Semantic UI React is suitable for both small and large-scale applications, providing a wide range of customizable components for various use cases.</p>
</li>
</ul>
<h3 id="heading-4-tailwind-csshttpstailwindcsscom"><a target="_blank" href="https://tailwindcss.com/">4. Tailwind CSS</a></h3>
<p><img src="https://s3-alpha.figma.com/hub/file/2603959525/8e909c88-4e83-4af4-b5b2-4a50a9b571f7-cover.png" alt="Tailwind CSS | Figma Community" /></p>
<p>Tailwind CSS is a utility-first CSS framework that emphasizes customization and rapid development. Unlike traditional frameworks that provide pre-defined components, Tailwind CSS offers a collection of utility classes that you can combine to create custom designs.</p>
<p><strong>Pros</strong></p>
<ul>
<li><p>High customizability: Tailwind CSS provides an extensive set of utility classes that allow developers to quickly customize and create unique designs without writing custom CSS.</p>
</li>
<li><p>Rapid prototyping and faster development cycles: With its utility classes, Tailwind CSS enables developers to rapidly prototype and iterate on designs, resulting in faster development cycles.</p>
</li>
<li><p>Extensive customization options: Tailwind CSS offers numerous configuration options and allows you to extend its default utility classes, giving you great flexibility and control over the design of your application.</p>
</li>
</ul>
<p><strong>Cons</strong></p>
<ul>
<li><p>Steeper learning curve: While the utility-first approach of Tailwind CSS offers many advantages, it can also result in a steeper learning curve, particularly for developers who are not familiar with this approach.</p>
</li>
<li><p>Larger CSS file sizes: Due to the utility-first nature of Tailwind CSS, the resulting CSS files can be larger compared to frameworks that use more optimized and minimalistic styles.</p>
</li>
</ul>
<p><strong>Use cases</strong></p>
<ul>
<li><p>Tailwind CSS is ideal for projects that require high customizability and rapid prototyping.</p>
</li>
<li><p>It is suitable for applications where you want to build unique designs without writing custom CSS from scratch.</p>
</li>
<li><p>Tailwind CSS is well-suited for projects that value speed, efficiency, and extensive customization options.</p>
</li>
</ul>
<h3 id="heading-5-chakra-uihttpschakra-uicom"><a target="_blank" href="https://chakra-ui.com/">5. Chakra UI</a></h3>
<p><img src="https://res.cloudinary.com/cloudinary-marketing/images/w_2000,h_1100/f_auto,q_auto/v1681925297/Web_Assets/blog/1bcfe6703127135710a9ba5872fc87f430e86128-1012x506-1_2815044aa3/1bcfe6703127135710a9ba5872fc87f430e86128-1012x506-1_2815044aa3-png?_i=AA" alt="Build Airbnb-style image cards with Chakra UI" /></p>
<p>Chakra UI is a lightweight and accessible CSS framework built specifically for ReactJS. It offers a collection of composable UI components that are easy to use and highly customizable. Chakra UI follows a design system approach, ensuring consistency and coherence across different components.</p>
<p><strong>Pros</strong></p>
<ul>
<li><p>Lightweight and accessible: Chakra UI prioritizes performance and accessibility, ensuring that your application is lightweight and provides an inclusive user experience.</p>
</li>
<li><p>Composable components: Chakra UI's components are highly composable, allowing developers to easily combine and reuse them to build complex UIs.</p>
</li>
<li><p>Consistency with design system approach: Chakra UI's design system approach ensures consistency in styling and user experience across different components, resulting in a cohesive and professional-looking application.</p>
</li>
</ul>
<p><strong>Cons</strong></p>
<ul>
<li><p>A limited number of components: While Chakra UI provides a solid set of components, the library may have a smaller number of components compared to other more established frameworks.</p>
</li>
<li><p>Less extensive customization options: Chakra UI focuses on providing a consistent design system, which means that the customization options may be more limited compared to frameworks that offer more flexibility.</p>
</li>
</ul>
<p><strong>Use cases</strong></p>
<ul>
<li><p>Chakra UI is well-suited for projects that prioritize performance and accessibility.</p>
</li>
<li><p>It is an excellent choice for building fast and inclusive applications, especially those with a focus on accessibility standards compliance.</p>
</li>
<li><p>Chakra UI's lightweight nature makes it suitable for projects that require efficient rendering and optimized performance.</p>
</li>
</ul>
<p>Now that we have explored the pros, cons, and use cases for each of the top five CSS frameworks for ReactJS, let's recap and compare them to help you make an informed decision.</p>
<p><strong>Material-UI</strong> stands out with its comprehensive library of components, responsiveness, and theming support. It is an excellent choice for projects that require a visually appealing and modern UI following Material Design guidelines.</p>
<p><strong>Bootstrap</strong> offers an extensive collection of pre-built components and a responsive grid system, making it suitable for applications with complex layouts. Its large community and ecosystem provide excellent support and a wide range of third-party extensions and themes.</p>
<p><strong>Semantic UI React'</strong>s semantic class names, extensive component library, and concise syntax make it a developer-friendly choice. It is suitable for projects that prioritize code readability and maintainability.</p>
<p><strong>Tailwind CSS</strong> provides high customizability through utility classes, allowing developers to quickly create unique designs. It is well-suited for projects that value rapid prototyping and extensive customization options.</p>
<p><strong>Chakra UI</strong>'s lightweight nature, composable components, and design system approach make it a great option for fast and inclusive applications. It is suitable for projects that prioritize performance and accessibility.</p>
<p>When choosing a CSS framework for your ReactJS project, consider factors such as the project requirements, the desired level of customization, the community support available, and the learning curve involved. Each framework has its strengths and weaknesses, so it's important to assess which one aligns best with your specific needs.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>Integrating a CSS framework into your ReactJS development can greatly enhance the design and aesthetics of your applications. Material-UI, Bootstrap, Semantic UI React, Tailwind CSS, and Chakra UI are all popular choices with unique features and advantages.</p>
<p>Material-UI offers a comprehensive library of components following Material Design principles, while Bootstrap provides an extensive collection of pre-built components and a responsive grid system. Semantic UI React prioritizes code readability and maintainability through semantic class names and concise syntax. Tailwind CSS emphasizes high customizability and rapid prototyping through utility classes. Chakra UI focuses on performance, accessibility, and a design system approach.</p>
<p>By understanding the use cases, pros, and cons of each framework, you can make an informed decision that best suits your project requirements and development preferences. Consider the specific needs of your project, evaluate the strengths and weaknesses of each framework, and choose the one that aligns best with your goals. Happy coding and creating visually stunning ReactJS applications with the perfect CSS framework!</p>
]]></content:encoded></item><item><title><![CDATA[Email Security 101: Verifying the Authenticity of Received Emails on Gmail for Safe Communication]]></title><description><![CDATA[Email has become an essential part of our lives. We use it to communicate with friends, family, and colleagues, and for many of us, it's the primary means of conducting business. Unfortunately, with the convenience of email comes the risk of cyber th...]]></description><link>https://blog.udoyhasan.com/email-security-101-verifying-the-authenticity-of-received-emails-on-gmail-for-safe-communication</link><guid isPermaLink="true">https://blog.udoyhasan.com/email-security-101-verifying-the-authenticity-of-received-emails-on-gmail-for-safe-communication</guid><category><![CDATA[cybersecurity]]></category><category><![CDATA[email security]]></category><category><![CDATA[Security]]></category><category><![CDATA[verify email authenticity ]]></category><category><![CDATA[gmail safety]]></category><dc:creator><![CDATA[MD UDOY HASAN]]></dc:creator><pubDate>Mon, 15 May 2023 14:58:07 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1684162541505/65b9319e-b760-4d05-bf22-b4f0a1f67a21.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Email has become an essential part of our lives. We use it to communicate with friends, family, and colleagues, and for many of us, it's the primary means of conducting business. Unfortunately, with the convenience of email comes the risk of cyber threats. Phishing scams, malware, and other types of cyber attacks can put your personal and professional information at risk.</p>
<p>One of the best ways to protect yourself from these threats is to verify the authenticity of received emails. In this blog post, we'll discuss how you can do this on Gmail, one of the most popular email services in the world.</p>
<p>You can verify the authenticity of received emails by using both the browser and Gmail app.</p>
<h2 id="heading-using-web-browser">Using web browser</h2>
<p>To verify using a web browser you need to visit the official Gmail site (<a target="_blank" href="https://mail.google.com">mail.google.com</a>) and click on the email that you want to verify.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1684158515547/8a82ef9b-adde-4b5b-bfe3-f8153bbec002.png" alt class="image--center mx-auto" /></p>
<p>After that follow these steps:</p>
<h3 id="heading-step-1-check-the-senders-email-address">Step 1: Check the Sender's Email Address</h3>
<p>The first step in verifying the authenticity of an email is to check the sender's email address. This is the address that appears in the "From" field of the email. If you know the sender, make sure that the email address is the same as the one you have on file. If you don't know the sender or if the email address is unfamiliar, proceed with caution.</p>
<p>Cybercriminals often use email addresses that look similar to legitimate ones, so be sure to scrutinize the address carefully. Look for misspellings, extra characters, or unusual domain names. For example, instead of "<a target="_blank" href="http://paypal.com">paypal.com</a>," a phishing email may come from "<a target="_blank" href="http://paypa1.com">paypa1.com</a>" or "<a target="_blank" href="http://paypal-security.com">paypal-security.com</a>."</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1684158674254/eab8d160-8418-4867-bd4d-a0723389cb74.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-step-2-look-for-the-mailed-by-and-signed-by-headers">Step 2: Look for the "Mailed-By" and "Signed-By" Headers</h3>
<p>Gmail provides additional information about the email's authenticity in the headers. To access the headers, open the email and click on the three dots in the top right corner of the email window. From the drop-down menu, select "Show original."</p>
<p>The headers will appear in a new window. Look for the "mailed-by" and "signed-by" headers. If the "mailed-by" and "signed-by" headers match the sender's domain, it's a good sign that the email is legitimate. If the headers show a different domain, be cautious and investigate further.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1684158852170/761f17d1-80d8-4607-a6c9-1c1722fc433b.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1684159044047/1ebea7a6-904c-49c9-884a-397d774bc9ac.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-step-3-check-the-emails-dkim-signature-advance">Step 3: Check the Email's DKIM Signature (Advance)</h3>
<p>DKIM (DomainKeys Identified Mail) is a method for verifying the authenticity of an email message. It involves adding a digital signature to the email's header, which can be verified by the recipient's email server.</p>
<p>To check the email's DKIM signature on Gmail, open the email and click on the three dots in the top right corner of the email window. From the drop-down menu, select "Show original." Look for the "DKIM-Signature" header in the email's header. If the header is present and valid, it's a good sign that the email is legitimate.</p>
<p>DKIM (DomainKeys Identified Mail) is a method for verifying the authenticity of an email message. It involves adding a digital signature to the email's header, which can be verified by the recipient's email server.</p>
<p>To check the email's DKIM signature on Gmail, open the email and click on the three dots in the top right corner of the email window. From the drop-down menu, select "Show original." Look for the "DKIM-Signature" header in the email's header. If the header is present and valid, it's a good sign that the email is legitimate.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1684159230162/21ac8334-3b25-4ea6-83c2-48a2d3839e29.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1684159338273/4dc3d545-ee53-407e-b25b-688776984ce2.png" alt class="image--center mx-auto" /></p>
<p>Now scroll down and try to search for <strong><em>"DKIM"</em></strong> and verify the result.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1684159615819/60675e7c-6e9b-4cd4-9ffc-250c8492d833.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-step-4-be-wary-of-links-and-attachments">Step 4: Be Wary of Links and Attachments</h3>
<p>Even if an email appears to be legitimate, be wary of links and attachments. Cybercriminals often use these to deliver malware or to trick you into providing sensitive information.</p>
<p>Before clicking on a link or downloading an attachment, hover your mouse over the link or attachment to see the URL or file name. If the link or attachment appears suspicious, don't click on it. Instead, contact the sender directly to verify the email's authenticity.</p>
<h3 id="heading-step-5-use-common-sense">Step 5: Use Common Sense</h3>
<p>Ultimately, the best defense against email scams is common sense. If an email seems too good to be true, it probably is. If you receive an unexpected email requesting sensitive information or asking you to take urgent action, be cautious. Verify the email's authenticity before taking any action.</p>
<h2 id="heading-using-the-mobile-app">Using the mobile app</h2>
<blockquote>
<p>It is recommanded to use the web browser insted of mobile app for verifying email's authenticity as there you will find more options.</p>
</blockquote>
<p>Open your Gmail app and log in to your Google account. Then select the email that you want to verify the authenticity. After that click on the arrow icon to see detailed information and verify the email's <strong><em>from</em></strong> address. Then click on See security details and verify the "Mailed By" &amp; "Signed By" domains.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1684161582318/01e8f30b-8523-41c0-b258-e51a06755c08.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1684161608798/05fc71a9-76fa-4135-8b89-dae6ace084b1.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1684161639004/4ea54f99-304a-4a7b-ba73-4d6bd38dd399.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1684161651446/d315a353-99d6-467d-b893-46102b89577c.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Email security is an essential part of protecting your personal and professional information. By verifying the authenticity of received emails on Gmail, you can minimize the risk of falling prey to phishing scams, malware, and other types of cyber attacks. Remember to check the sender's email address, look for the "mailed-by" and "signed-by" headers, check the email's DKIM signature, be wary of links and attachments, and use common sense. By following these steps, you can help ensure safe communication on Gmail and protect yourself from cyber threats.</p>
<p>In conclusion, email security is everyone's responsibility. By taking the time to verify the authenticity of received emails, you can do your part to stay safe online. Don't let cybercriminals trick you into divulging sensitive information or downloading malware. Stay vigilant and stay safe.</p>
]]></content:encoded></item><item><title><![CDATA[ReactJS vs VueJS vs AngularJS: Which Is the Best Frontend Framework for 2023?]]></title><description><![CDATA[Introduction
Choosing the right front-end framework for web development is crucial to ensure that the website or application you build is efficient, responsive, and user-friendly. With numerous frontend frameworks available in the market, developers ...]]></description><link>https://blog.udoyhasan.com/reactjs-vs-vuejs-vs-angularjs-which-is-the-best-frontend-framework-for-2023</link><guid isPermaLink="true">https://blog.udoyhasan.com/reactjs-vs-vuejs-vs-angularjs-which-is-the-best-frontend-framework-for-2023</guid><category><![CDATA[React]]></category><category><![CDATA[Vue.js]]></category><category><![CDATA[Angular]]></category><category><![CDATA[React vs Vue vs Angular]]></category><category><![CDATA[best frontend framework for 2023]]></category><dc:creator><![CDATA[MD UDOY HASAN]]></dc:creator><pubDate>Sun, 14 May 2023 13:07:28 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1684069455368/a2ba64df-0250-4f03-ac86-dea6171013a6.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction">Introduction</h2>
<p>Choosing the right front-end framework for web development is crucial to ensure that the website or application you build is efficient, responsive, and user-friendly. With numerous frontend frameworks available in the market, developers have many options to choose from, each with its strengths and weaknesses. Three of the most popular front-end frameworks are ReactJS, VueJS, and AngularJS. In this article, we will compare these frameworks and help you decide which one is the best for front-end development in 2023.</p>
<h3 id="heading-reactjs">ReactJS</h3>
<p>ReactJS is an open-source JavaScript library for building user interfaces. It was developed by Facebook and is currently maintained by Facebook, Instagram, and a community of individual developers and corporations. ReactJS is a component-based library that allows developers to create reusable UI components that can be used across multiple projects.</p>
<p>One of the key benefits of using ReactJS is that it provides a fast and efficient way to create complex user interfaces. ReactJS uses a virtual DOM, which allows it to update only the parts of the UI that have changed instead of updating the entire page. This makes ReactJS very fast and efficient and can help reduce the load on the server.</p>
<p>Another advantage of using ReactJS is that it has a vast community of developers, which means numerous resources are available for developers to learn and troubleshoot any issues they may face. ReactJS is also used by many well-known companies, including Facebook, Instagram, Netflix, and Airbnb.</p>
<h3 id="heading-vuejs">VueJS</h3>
<p>VueJS is another open-source JavaScript library for building user interfaces. It was created by Evan You and first released in 2014. VueJS is known for its simplicity, ease of use, and versatility. It allows developers to create UI components that can be easily integrated into existing projects, making it an excellent choice for both small and large-scale projects.</p>
<p>One of the key benefits of using VueJS is that it is easy to learn, even for developers who are new to frontend development. VueJS uses a template-based syntax, which is similar to HTML, making it easy for developers to understand and use. VueJS also has excellent documentation, which makes it easy for developers to learn and troubleshoot any issues they may face.</p>
<p>Another advantage of using VueJS is that it is very lightweight and fast, which can help reduce page load times and improve the overall performance of your website or application. VueJS also has a growing community of developers, which means there are plenty of resources available for developers to learn and get help with any issues they may face.</p>
<h3 id="heading-angularjs">AngularJS</h3>
<p>AngularJS is an open-source front-end web application framework developed by Google. It was released in 2010 and is currently maintained by Google and a community of developers. AngularJS is a complete solution for building web applications and provides a range of features, including data binding, directives, and dependency injection.</p>
<p>One of the key benefits of using AngularJS is that it provides a complete solution for building web applications. AngularJS includes many built-in features, such as routing, form validation, and HTTP requests, which can help reduce the amount of time and effort required to build a web application. AngularJS also has a large community of developers, which means there are many resources available for developers to learn and troubleshoot any issues they may face.</p>
<p>Another advantage of using AngularJS is that it is very powerful and flexible. AngularJS allows developers to create complex web applications with ease, using a range of features such as data binding, dependency injection, and directives. AngularJS also has excellent support for testing, which can help ensure that your web application is reliable and free from bugs.</p>
<h2 id="heading-comparison-of-reactjs-vuejs-and-angularjs">Comparison of ReactJS, VueJS, and AngularJS</h2>
<p>Now that we have looked at the key features and benefits of ReactJS, VueJS, and AngularJS, let us compare them based on some essential factors that are crucial for frontend development</p>
<ol>
<li><p><strong>Learning Curve</strong></p>
<p> One of the most critical factors to consider when choosing a front-end framework is the learning curve. Developers need to invest a significant amount of time and effort in learning a new framework, so it's essential to choose one that is easy to learn and use.</p>
<p> In terms of the learning curve, VueJS is the easiest to learn among the three frameworks. VueJS uses a simple template-based syntax that is similar to HTML, making it easy for developers to understand and use. ReactJS and AngularJS, on the other hand, have a steeper learning curve, as they use more complex syntax and concepts.</p>
</li>
<li><p><strong>Performance</strong></p>
<p> Performance is another crucial factor to consider when choosing a front-end framework. A fast and responsive website or application is essential to provide a smooth user experience.</p>
<p> ReactJS is known for its excellent performance, thanks to its virtual DOM. The virtual DOM allows ReactJS to update only the parts of the UI that have changed, reducing the load on the server and improving performance. VueJS also has excellent performance, as it is lightweight and fast. AngularJS, however, can be slower than ReactJS and VueJS, as it has a more complex architecture.</p>
</li>
<li><p><strong>Community Support</strong></p>
<p> Community support is another essential factor to consider when choosing a front-end framework. A large and active community of developers can provide resources, tutorials, and support, making it easier for developers to learn and troubleshoot any issues they may face.</p>
<p> ReactJS has a vast and active community of developers, with many resources available, including tutorials, forums, and libraries. VueJS also has a growing community of developers, with many resources available, including comprehensive documentation and a large number of plugins and libraries. AngularJS, however, has a more significant and established community of developers, with many resources available, including tutorials, forums, and a vast range of plugins and libraries.</p>
</li>
<li><p><strong>Flexibility</strong></p>
<p> Flexibility is another important factor to consider when choosing a frontend framework. A flexible framework allows developers to create custom solutions that meet their specific needs.</p>
<p> ReactJS is known for its flexibility, as it allows developers to create custom solutions using its component-based architecture. VueJS is also flexible, as it allows developers to integrate with existing projects easily. AngularJS, on the other hand, has a more opinionated approach, which can limit its flexibility.</p>
</li>
<li><p><strong>Maintenance and Updates</strong></p>
<p> Maintenance and updates are essential factors to consider when choosing a front-end framework. Developers need to ensure that the framework they choose is well-maintained and updated regularly to ensure that it remains compatible with the latest technologies and standards.</p>
<p> ReactJS is well-maintained by Facebook and has a history of regular updates and improvements. VueJS is also well-maintained by a team of developers, with regular updates and improvements. AngularJS, however, is no longer actively developed, as the development team has moved on to the newer version, Angular.</p>
</li>
</ol>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Choosing the best front-end framework for 2023 is not an easy task, as each framework has its strengths and weaknesses. ReactJS, VueJS, and AngularJS are all excellent choices for front-end development, depending on your specific needs.</p>
<p>ReactJS is an excellent choice for developers who prioritize performance and efficiency, and who value a vast and active community of developers. VueJS is an excellent choice for developers who value simplicity, ease of use, and versatility and want a lightweight and fast framework. AngularJS is an excellent choice for developers who want a complete solution for building web applications and who value a large and established community of developers.</p>
<p>Ultimately, the choice of frontend framework depends on your specific needs, priorities, and preferences. By considering the factors discussed in this article, you can make an informed decision and choose the best front-end framework for your web development project in 2023.</p>
]]></content:encoded></item><item><title><![CDATA[Beginner's Guide to Install and Configure Nginx on Ubuntu 22.04: Step-by-Step Tutorial]]></title><description><![CDATA[Nginx is a popular web server used by many websites and web applications. In this tutorial, we'll walk you through the process of installing and configuring Nginx on Ubuntu 22.04. By the end of this guide, you'll have a working Nginx server that can ...]]></description><link>https://blog.udoyhasan.com/beginners-guide-to-install-and-configure-nginx-on-ubuntu-2204-step-by-step-tutorial</link><guid isPermaLink="true">https://blog.udoyhasan.com/beginners-guide-to-install-and-configure-nginx-on-ubuntu-2204-step-by-step-tutorial</guid><category><![CDATA[nginx]]></category><category><![CDATA[Ubuntu 22.04 web server setup]]></category><category><![CDATA[Web hosting with Nginx]]></category><category><![CDATA[Nginx configuration guide]]></category><category><![CDATA[Nginx installation tutorial]]></category><dc:creator><![CDATA[MD UDOY HASAN]]></dc:creator><pubDate>Sun, 14 May 2023 04:16:12 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1684037919376/08ba7861-d63d-4822-a3ff-079ebc72c337.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Nginx is a popular web server used by many websites and web applications. In this tutorial, we'll walk you through the process of installing and configuring Nginx on Ubuntu 22.04. By the end of this guide, you'll have a working Nginx server that can serve web pages and handle incoming traffic.</p>
<h3 id="heading-prerequisites"><strong>Prerequisites</strong></h3>
<p>Before we get started, you'll need to make sure that you have the following:</p>
<ul>
<li><p>A server running Ubuntu 22.04</p>
<p>  (Get free $100 on your <a target="_blank" href="https://cutt.ly/digitaloceanfree100">Digitalocean</a> account to deploy your first server)</p>
</li>
<li><p>A non-root user with sudo privileges</p>
</li>
<li><p>A basic understanding of the Linux command line</p>
</li>
</ul>
<h3 id="heading-installation-steps">Installation Steps</h3>
<p><strong>Step 1: SSH into your server</strong></p>
<p>In order to perform the installation and configuration steps we need to log in or the server via ssh. For login, you will be needing a terminal or PowerShell. So please open it. There are 2 methods that we can use to log in to the server via ssh.</p>
<ul>
<li><p><strong>Method 1: Via Password</strong></p>
<p>  To log in using a password run this in your terminal/PowerShell</p>
<pre><code class="lang-bash">  ssh username@server_ip_address_here
</code></pre>
<p>  Then it will ask for your password please provide your password for the server.</p>
</li>
<li><p><strong>Method 2: Via SSH Key</strong></p>
<p>  If you have set up an ssh key instead of a password for login then you need to run this in your terminal/PowerShell.</p>
<pre><code class="lang-bash">  <span class="hljs-comment"># This is only for the 1st time</span>
  chmod 400 /path/to/the/private_key.pem

  <span class="hljs-comment"># This is for every time</span>
  ssh -i <span class="hljs-string">"/path/to/the/private_key.pem"</span> username@server_ip_address_here
</code></pre>
</li>
</ul>
<blockquote>
<p>Note: If you use different port than <code>22</code> Then you need to use the <code>-p</code> flag after the ssh commands.</p>
<p>For example:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># In this example we have used port 2022 as the ssh port</span>
ssh username@server_ip_address_here -p2022
</code></pre>
</blockquote>
<p><strong>Step 2: Update Ubuntu</strong></p>
<p>Before we begin, it is essential to make sure that your Ubuntu system is up-to-date. This can be done using the following commands:</p>
<pre><code class="lang-bash">sudo apt update
sudo apt upgrade
</code></pre>
<p>The first command updates the package list, and the second command upgrades any outdated packages to their latest version.</p>
<p><strong>Step 2: Install Nginx</strong></p>
<p>Next, we'll install Nginx by running the following command:</p>
<pre><code class="lang-bash">sudo apt install nginx
</code></pre>
<p>Once the installation is complete, you can start Nginx by running the following command:</p>
<pre><code class="lang-bash">sudo systemctl start nginx
</code></pre>
<p>You can also check the status of Nginx by running the following command:</p>
<pre><code class="lang-bash">sudo systemctl status nginx
</code></pre>
<h3 id="heading-configuration-steps">Configuration Steps</h3>
<p><strong>Step 1: Configure Firewall</strong></p>
<p>It's a good idea to configure your firewall to allow traffic on the ports that Nginx uses. By default, Nginx uses port 80 for HTTP traffic and port 443 for HTTPS traffic.</p>
<p>If you are running a firewall on your server, you will need to configure it to allow traffic to your web server. By default, Ubuntu 22.04 comes with a firewall called UFW (Uncomplicated Firewall). You can check if UFW is running using the following command:</p>
<pre><code class="lang-bash">sudo ufw status
</code></pre>
<blockquote>
<p>Attention!!!</p>
<p>Please allow your ssh port before enabling the UFW or else you will lose access of your server.</p>
<pre><code class="lang-bash"><span class="hljs-comment"># For default port</span>
sudo ufw allow 22

<span class="hljs-comment"># For custom port</span>
sudo ufw allow custom_port_number_here
</code></pre>
</blockquote>
<p>If UFW is not running, you can enable it using the following command:</p>
<pre><code class="lang-bash">sudo ufw <span class="hljs-built_in">enable</span>
</code></pre>
<p>Now to allow traffic on nginx ports, you can run the following commands:</p>
<pre><code class="lang-bash">sudo ufw allow <span class="hljs-string">'Nginx HTTP'</span>
sudo ufw allow <span class="hljs-string">'Nginx HTTPS'</span>
</code></pre>
<p><strong>Step 2: Create a Virtual Host</strong></p>
<p>To serve web pages with Nginx, you'll need to create a virtual host. A virtual host is a configuration file that tells Nginx how to serve your website or web application.</p>
<p>To create a virtual host file, run the following command:</p>
<pre><code class="lang-bash">sudo nano /etc/nginx/sites-available/example.com
</code></pre>
<p>Replace <code>example.com</code> with your own domain name.</p>
<p>In the file, paste the following configuration:</p>
<pre><code class="lang-bash">server {
    listen 80;
    listen [::]:80;

    server_name example.com www.example.com;

    root /var/www/example.com/html;
    index index.html;

    location / {
        try_files <span class="hljs-variable">$uri</span> <span class="hljs-variable">$uri</span>/ =404;
    }
}
</code></pre>
<p>This configuration tells Nginx to listen on port <code>80</code> and to serve web pages from the <code>/var/www/example.com/html</code> directory.</p>
<p>Once you've saved the configuration file, create a symbolic link from the <code>sites-available</code> directory to the <code>sites-enabled</code> directory by running the following command:</p>
<pre><code class="lang-bash">sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
</code></pre>
<p>Finally, restart Nginx by running the following command:</p>
<pre><code class="lang-bash">sudo systemctl restart nginx
</code></pre>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>In this tutorial, I've shown you how to install and configure Nginx on Ubuntu 22.04. By following these steps, you should now have a working Nginx server that can serve web pages and handle incoming traffic. If you run into any issues, feel free to leave a comment and I'll try to help you.</p>
]]></content:encoded></item><item><title><![CDATA[A Beginner's Guide to Install and Configure Apache 2 Web Server on Ubuntu 22.04]]></title><description><![CDATA[As the internet continues to grow and expand, the need for web servers becomes increasingly important. Web servers are the backbone of the Internet, and they enable websites and web applications to be accessed by users all over the world. One of the ...]]></description><link>https://blog.udoyhasan.com/a-beginners-guide-to-install-and-configure-apache-2-web-server-on-ubuntu-2204</link><guid isPermaLink="true">https://blog.udoyhasan.com/a-beginners-guide-to-install-and-configure-apache-2-web-server-on-ubuntu-2204</guid><category><![CDATA[apache]]></category><category><![CDATA[Ubuntu 22.04]]></category><category><![CDATA[Install Apache 2 on Ubuntu]]></category><category><![CDATA[Configure Apache 2 on Ubuntu]]></category><category><![CDATA[Web server setup on Ubuntu]]></category><dc:creator><![CDATA[MD UDOY HASAN]]></dc:creator><pubDate>Sat, 13 May 2023 19:42:48 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1684006774234/509fe3ee-0b3e-487c-a9ee-54d1b47c3af0.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As the internet continues to grow and expand, the need for web servers becomes increasingly important. Web servers are the backbone of the Internet, and they enable websites and web applications to be accessed by users all over the world. One of the most popular web servers available today is Apache, which is open-source, free to use, and widely supported. In this beginner's guide, I will walk you through the steps to install and configure Apache 2 on Ubuntu 22.04.</p>
<h3 id="heading-video-tutorial">Video Tutorial</h3>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.youtube.com/watch?v=YeoDypn2rkM">https://www.youtube.com/watch?v=YeoDypn2rkM</a></div>
<p> </p>
<h3 id="heading-pre-requirements">Pre-requirements</h3>
<ul>
<li><p>A server running Ubuntu 22.04</p>
<p>  (Get free $100 on your <a target="_blank" href="https://cutt.ly/digitaloceanfree100">Digitalocean</a> account to deploy your first server)</p>
</li>
<li><p>A non-root user with sudo privileges</p>
</li>
<li><p>A basic understanding of the Linux command line</p>
</li>
</ul>
<h3 id="heading-installation-steps">Installation Steps</h3>
<p><strong>Step 1: SSH into your server</strong></p>
<p>In order to perform the installation and configuration steps we need to log in or the server via ssh. For login, you will be needing a terminal or PowerShell. So please open it. There are 2 methods that we can use to log in to the server via ssh.</p>
<ul>
<li><p><strong>Method 1: Via Password</strong></p>
<p>  To log in using a password run this in your terminal/PowerShell</p>
<pre><code class="lang-bash">  ssh username@server_ip_address_here
</code></pre>
<p>  Then it will ask for your password please provide your password for the server.</p>
</li>
<li><p><strong>Method 2: Via SSH Key</strong></p>
<p>  If you have set up an ssh key instead of a password for login then you need to run this in your terminal/PowerShell.</p>
<pre><code class="lang-bash">  <span class="hljs-comment"># This is only for the 1st time</span>
  chmod 400 /path/to/the/private_key.pem

  <span class="hljs-comment"># This is for every time</span>
  ssh -i <span class="hljs-string">"/path/to/the/private_key.pem"</span> username@server_ip_address_here
</code></pre>
</li>
</ul>
<blockquote>
<p>Note: If you use different port than <code>22</code> Then you need to use the <code>-p</code> flag after the ssh commands.</p>
<p>For example:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># In this example I have used port 2022 as the ssh port</span>
ssh username@server_ip_address_here -p2022
</code></pre>
</blockquote>
<p><strong>Step 2: Update Ubuntu</strong></p>
<p>Before we begin, it is essential to make sure that your Ubuntu system is up-to-date. This can be done using the following commands:</p>
<pre><code class="lang-bash">sudo apt update
sudo apt upgrade
</code></pre>
<p>The first command updates the package list, and the second command upgrades any outdated packages to their latest version.</p>
<p><strong>Step 3: Install Apache 2</strong></p>
<p>Now that we have updated Ubuntu, it's time to install Apache 2. This can be done using the following command:</p>
<pre><code class="lang-bash">sudo apt install apache2
</code></pre>
<p>Once the installation is complete, you can verify that Apache 2 is running by entering your server's IP address in your web browser. You should see the Apache 2 default page.</p>
<h3 id="heading-configuration-steps"><strong>Configuration Steps</strong></h3>
<p><strong>Step 1: Configure Apache 2</strong></p>
<p>Now that we have installed Apache 2, it's time to configure it. The Apache configuration file is located at /etc/apache2/apache2.conf. You can open it using a text editor like <code>nano</code> or <code>vim</code>:</p>
<pre><code class="lang-bash">sudo nano /etc/apache2/apache2.conf
</code></pre>
<p>Here are some key configurations to pay attention to:</p>
<p><code>ServerName</code> - This directive should be set to your server's domain name or IP address.</p>
<p><code>DocumentRoot</code> - This directive sets the location of your website's files.</p>
<p><code>DirectoryIndex</code> - This directive sets the default page that is served when a user visits your website. By default, Apache 2 serves index.html.</p>
<p>No changes are needed here. But still if you want you can change some options. Once you have made your changes, save the file and exit.</p>
<p><strong>Step 2: Create a Virtual Host</strong></p>
<p>If you want to host multiple websites on your server, you will need to create a virtual host. A virtual host allows Apache 2 to serve multiple websites on a single server. To create a virtual host, create a new file in the <code>/etc/apache2/sites-available/</code> directory:</p>
<pre><code class="lang-bash">sudo nano /etc/apache2/sites-available/example.com.conf
</code></pre>
<p>Here is an example of a virtual host configuration:</p>
<pre><code class="lang-apache"><span class="hljs-section">&lt;VirtualHost *<span class="hljs-number">:80</span>&gt;</span>
    <span class="hljs-attribute"><span class="hljs-nomarkup">ServerName</span></span> example.com
    <span class="hljs-attribute">ServerAlias</span> www.example.com
    <span class="hljs-attribute"><span class="hljs-nomarkup">DocumentRoot</span></span> /var/www/example.com/public_html
    <span class="hljs-attribute">ErrorLog</span> <span class="hljs-variable">${APACHE_LOG_DIR}</span>/error.log
    <span class="hljs-attribute">CustomLog</span> <span class="hljs-variable">${APACHE_LOG_DIR}</span>/access.log combined
<span class="hljs-section">&lt;/VirtualHost&gt;</span>
</code></pre>
<p>In this example, I have created a virtual host for <code>example.com</code>. I have set the <code>ServerName</code> and <code>ServerAlias</code> directives to point to our website's domain name. The <code>DocumentRoot</code> directive sets the location of our website's files. Finally, the <code>ErrorLog</code> and <code>CustomLog</code> directives set the location of Apache 2's log files.</p>
<p>Once you have created your virtual host configuration, you will need to enable it using the following command:</p>
<pre><code class="lang-bash">sudo a2ensite example.com.conf
</code></pre>
<p>This command creates a symbolic link in the <code>/etc/apache2/sites-enabled/</code> directory to your virtual host configuration.</p>
<p><strong>Step 3: Restart Apache 2</strong></p>
<p>Now that we have made our changes to the Apache 2 configuration, we need to restart the service for the changes to take effect. This can be done using the following command:</p>
<pre><code class="lang-bash">sudo systemctl restart apache2
</code></pre>
<p>This command restarts the Apache 2 service.</p>
<p><strong>Step 4: Configure Firewall</strong></p>
<p>If you are running a firewall on your server, you will need to configure it to allow traffic to your web server. By default, Ubuntu 22.04 comes with a firewall called UFW (Uncomplicated Firewall). You can check if UFW is running using the following command:</p>
<pre><code class="lang-bash">sudo ufw status
</code></pre>
<blockquote>
<p>Attention!!!</p>
<p>Please allow your ssh port before enabling the UFW or else you will lose access of your server.</p>
<pre><code class="lang-bash"><span class="hljs-comment"># For default port</span>
sudo ufw allow 22

<span class="hljs-comment"># For custom port</span>
sudo ufw allow custom_port_number_here
</code></pre>
</blockquote>
<p>If UFW is not running, you can enable it using the following command:</p>
<pre><code class="lang-bash">sudo ufw <span class="hljs-built_in">enable</span>
</code></pre>
<p>To allow incoming HTTP traffic, you can run the following command:</p>
<pre><code class="lang-bash">sudo ufw allow http
</code></pre>
<p>To allow incoming HTTPS traffic, you can run the following command:</p>
<pre><code class="lang-bash">sudo ufw allow https
</code></pre>
<p><strong>Step 5: Test Your Web Server</strong></p>
<p>Now that you have installed and configured Apache 2, it's time to test your web server. Open your web browser and enter your server's IP address or domain name. You should see your website's default page or the page for the virtual host you created earlier.</p>
<p>Congratulations! You have successfully installed and configured Apache 2 on Ubuntu 22.04.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>In this beginner's guide, I have walked you through the steps to install and configure Apache 2 on Ubuntu 22.04. I covered key configurations such as the <code>ServerName</code>, <code>DocumentRoot</code>, and <code>DirectoryIndex</code> directives, and I showed you how to create a virtual host for hosting multiple websites. I also covered how to restart Apache 2 and configure the firewall to allow incoming HTTP and HTTPS traffic. With this knowledge, you should be able to set up a basic web server on Ubuntu 22.04 using Apache 2.</p>
]]></content:encoded></item></channel></rss>