<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hidde</title>
    <description>The latest articles on DEV Community by Hidde (@thatonehidde).</description>
    <link>https://dev.to/thatonehidde</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F609415%2F6283a343-46ff-48f0-8975-205523aad47f.jpeg</url>
      <title>DEV Community: Hidde</title>
      <link>https://dev.to/thatonehidde</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thatonehidde"/>
    <language>en</language>
    <item>
      <title>How to set up a reverse proxy with Nginx, configure SSL and connect a subdomain</title>
      <dc:creator>Hidde</dc:creator>
      <pubDate>Tue, 15 Mar 2022 14:15:14 +0000</pubDate>
      <link>https://dev.to/thatonehidde/how-to-set-up-a-reverse-proxy-with-nginx-configure-ssl-and-connect-a-subdomain-582o</link>
      <guid>https://dev.to/thatonehidde/how-to-set-up-a-reverse-proxy-with-nginx-configure-ssl-and-connect-a-subdomain-582o</guid>
      <description>&lt;p&gt;Hello Devs,&lt;/p&gt;

&lt;p&gt;Today i am going to explain you what a reverse proxy is and how to configure it using &lt;a href="https://www.nginx.com/"&gt;Nginx&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a reverse proxy?
&lt;/h2&gt;

&lt;p&gt;A reverse proxy server is an intermediate connection point positioned at a network's edge. It receives initial HTTP connection requests, acting like the actual endpoint. Essentially your network's traffic cop, the reverse proxy serves as a gateway between users and your application origin server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Started
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;br&gt;
I assume you have a domain and a Linux server with &lt;a href="https://ubuntu.com/"&gt;Ubuntu&lt;/a&gt;, &lt;a href="https://www.debian.org/index.nl.html"&gt;Debian&lt;/a&gt; or &lt;a href="https://www.centos.org/"&gt;Centos&lt;/a&gt; installed. In this example, I'm using &lt;a href="https://ubuntu.com/"&gt;Ubuntu&lt;/a&gt; 20.04.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Nginx&lt;/strong&gt;&lt;br&gt;
To get started, open a ssh connection to your server, and install Nginx with the following commands.&lt;/p&gt;

&lt;p&gt;Update your machine:&lt;br&gt;
&lt;code&gt;sudo apt update&lt;/code&gt;&lt;br&gt;
Install nginx:&lt;br&gt;
&lt;code&gt;sudo apt install nginx&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After the installation process, Ubuntu 20.04 starts Nginx, so the web server should already be up and running. We can check this to make sure the service is running with this command:&lt;br&gt;
&lt;code&gt;systemctl status nginx&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If nginx is not running, it can be possible that port 80 is already in use by Apache. In this case, you need to stop / remove Apache.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Configuration&lt;/strong&gt;&lt;br&gt;
To configure the reverse proxy, edit the domain's server block configuration using Nano:&lt;br&gt;
&lt;code&gt;nano /etc/nginx/sites-available/default&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add this at the bottom of the config file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server {
    listen 80;
    server_name www.example.com example.com;

    location / {
       proxy_pass http://127.0.0.1:8080;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change the value of server_name with your domain / subdomain, and change the port of proxy pass to the port that your web server is running on.&lt;/p&gt;

&lt;p&gt;Restart the Nginx service:&lt;br&gt;
&lt;code&gt;systemctl restart nginx&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The reverse proxy should work now. If this is not the case, comment below to get help.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configure DNS&lt;/strong&gt;&lt;br&gt;
Now let's connect your domain.&lt;br&gt;
Go to the DNS settings of your domain (&lt;a href="https://www.cloudflare.com/"&gt;Cloudflare&lt;/a&gt; for example) and add an A record with your domain / subdomain as name and the ip address of your server as value. Save it and you're done!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Generate an SSL certificate&lt;/strong&gt;&lt;br&gt;
You can generate a SSL certificate (for free) with Letsencrypt to encrypt your traffic and enable your domain to be accessed from the HTTPS protocol.&lt;/p&gt;

&lt;p&gt;Install Certbot and dependencies:&lt;br&gt;
&lt;code&gt;sudo apt install certbot python3-certbot-nginx&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Generate the certificate:&lt;br&gt;
&lt;code&gt;sudo certbot --nginx -d example.com&lt;/code&gt;&lt;br&gt;
replace example.com with your (sub)domain.&lt;/p&gt;

&lt;p&gt;Enter your email and agree to the TOS. &lt;br&gt;
After Certbot completes generating the certificate, it should automaicly reload Nginx with the new settings.&lt;/p&gt;

&lt;p&gt;That's it!&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;br&gt;
I hope this was a helpful article. If so, let me know :)&lt;/p&gt;

</description>
      <category>networking</category>
      <category>reverseproxy</category>
      <category>nginx</category>
      <category>cloudflare</category>
    </item>
    <item>
      <title>Get started creating beautiful designs with daisyUI</title>
      <dc:creator>Hidde</dc:creator>
      <pubDate>Mon, 14 Mar 2022 16:19:46 +0000</pubDate>
      <link>https://dev.to/thatonehidde/get-started-creating-beautiful-ui-with-daisyui-29ad</link>
      <guid>https://dev.to/thatonehidde/get-started-creating-beautiful-ui-with-daisyui-29ad</guid>
      <description>&lt;p&gt;Hello Devs.&lt;/p&gt;

&lt;p&gt;If you're looking for an efficient and modern way to use &lt;a href="https://tailwindcss.com/" rel="noopener noreferrer"&gt;Tailwind CSS&lt;/a&gt;, look no further than &lt;a href="https://daisyui.com/" rel="noopener noreferrer"&gt;daisyUI&lt;/a&gt;. &lt;a href="https://daisyui.com/" rel="noopener noreferrer"&gt;daisyUI&lt;/a&gt; is a &lt;a href="https://tailwindcss.com/" rel="noopener noreferrer"&gt;Tailwind CSS&lt;/a&gt; component library that helps you to quickly create efficient and consistent designs. It includes everything you need to get started with &lt;a href="https://tailwindcss.com/" rel="noopener noreferrer"&gt;Tailwind&lt;/a&gt;, including buttons, modals, themes, a color palette, and typography.&lt;/p&gt;

&lt;p&gt;To get started with daisyUI, simply install the plugin using npm:&lt;br&gt;
&lt;code&gt;npm i daisyui&lt;/code&gt;&lt;br&gt;
Or if you are using Yarn:&lt;br&gt;
&lt;code&gt;yarn add daisyui&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then add daisyUI to your tailwind.config.js files:&lt;br&gt;
&lt;code&gt;module.exports = {&lt;br&gt;
  //...&lt;br&gt;
  plugins: [require("daisyui")],&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now to start using daisyUI in your project, open a component and start using the &lt;a href="https://daisyui.com/docs/use/" rel="noopener noreferrer"&gt;CSS Classes&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For example: &lt;br&gt;
&lt;code&gt;&amp;lt;button class="btn btn-active btn-primary"&amp;gt;Button&amp;lt;/button&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhgsqj1qfz4by43stn0h9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhgsqj1qfz4by43stn0h9.png" alt="Example Button"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://daisyui.com/" rel="noopener noreferrer"&gt;Documentation&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I hope this was helpful.&lt;br&gt;
Thanks for reading!&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>daisyui</category>
      <category>design</category>
    </item>
  </channel>
</rss>
