<?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: vkuberan@gmail.com</title>
    <description>The latest articles on DEV Community by vkuberan@gmail.com (@vkuberan_88).</description>
    <link>https://dev.to/vkuberan_88</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%2F330645%2F4d6bcdd7-107c-4557-993e-0bc29de63c97.gif</url>
      <title>DEV Community: vkuberan@gmail.com</title>
      <link>https://dev.to/vkuberan_88</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vkuberan_88"/>
    <language>en</language>
    <item>
      <title>Docker Compose - Ubuntu LAMP Setup on Windows</title>
      <dc:creator>vkuberan@gmail.com</dc:creator>
      <pubDate>Sun, 12 Dec 2021 08:33:03 +0000</pubDate>
      <link>https://dev.to/vkuberan_88/docker-compose-ubuntu-lamp-setup-on-windows-2igd</link>
      <guid>https://dev.to/vkuberan_88/docker-compose-ubuntu-lamp-setup-on-windows-2igd</guid>
      <description>&lt;p&gt;&lt;strong&gt;This setup is only for local development, so I didn't add any security-related layers to it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My Directory Structure for this setup was like this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;lamp/&lt;/strong&gt;&lt;br&gt;
      ├─ Dockerfile&lt;br&gt;
      ├─ docker-compose.yml&lt;br&gt;
      ├─ 000-default.conf&lt;/p&gt;

&lt;p&gt;After setting up (copy the given files below) or download it from &lt;a href="https://github.com/vkuberan/ubuntu-lamp-setup"&gt;here&lt;/a&gt;. Then switch to the lamp directory and issue the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker-compose up
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Docker File
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;File Name:&lt;/strong&gt; &lt;em&gt;&lt;a href="https://gist.github.com/vkuberan/832fbeb5799f07a35e05473b47c843af"&gt;Dockerfile&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;h2&gt;
  
  
  Docker Compose
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;File Name:&lt;/strong&gt; &lt;em&gt;&lt;a href="https://gist.github.com/vkuberan/761f041cd09edfde956eef64971b7a20"&gt;docker-compose.yml&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Default Conf
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;File Name:&lt;/strong&gt; &lt;a href="https://gist.github.com/vkuberan/5af37d8f50287cfc3c45cb2863aefde9"&gt;000-default.conf&lt;/a&gt;&lt;br&gt;
This file is used to enable rewriteurl feature in &lt;em&gt;/var/www/html/&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


</description>
      <category>docker</category>
      <category>ubuntu</category>
      <category>apache</category>
      <category>php</category>
    </item>
    <item>
      <title>Docker Ubuntu LAMP Setup on Windows</title>
      <dc:creator>vkuberan@gmail.com</dc:creator>
      <pubDate>Thu, 09 Dec 2021 08:49:00 +0000</pubDate>
      <link>https://dev.to/vkuberan_88/docker-ubuntu-lamp-setup-on-windows-36l5</link>
      <guid>https://dev.to/vkuberan_88/docker-ubuntu-lamp-setup-on-windows-36l5</guid>
      <description>&lt;p&gt;&lt;strong&gt;MY LAMP SETUP&lt;/strong&gt; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Pull Ubuntu&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker pull ubuntu:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Pull Mariadb&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker pull mariadb:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create the shared network&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker network create --driver=bridge lampstack
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create MariaDB Container&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker run -itd -p 33063:3306 --name=lampmysql \
 --network=lampstack \
 --env MARIADB_USER=root \
 --env MARIADB_PASSWORD=google \
 --env MARIADB_ROOT_PASSWORD=google \
 mariadb:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create Ubuntu Container&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Replace &lt;strong&gt;"./htdocs"&lt;/strong&gt; with your working directory path.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -itd -p 8080:80 \
--user root \
--name=lampstack \
--network=lampstack \
-v ./htdocs:/var/www/html/ \
ubuntu:22.04 /bin/bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Get in to the Ubuntu Container&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker attach lampstack
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Install all necessary Apache/PHP packages&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Refer 1: &lt;a href="https://www.tecmint.com/install-wordpress-in-ubuntu-lamp-stack/"&gt;Ubuntu - Install LAMP Stack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Execute the following commands one by one.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update Ubuntu&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt-get update
apt-get upgrade
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;em&gt;Install necessary tools along with apache&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt-get install iputils-ping \
vim \
systemctl \
apache2 \ 
apache2-utils \
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;em&gt;Enable apache server&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl enable apache2
systemctl start apache2 
systemctl status apache2
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;em&gt;Install mariadb client and PHP&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apt-get install mariadb-client \
php \
libapache2-mod-php \
php-mysql \
php-curl \
php-gd \
php-mbstring \
php-xml \
php-soap \
php-intl \
php-zip
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;em&gt;Enable rewrite and Restart apache server&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a2enmod rewrite
systemctl restart apache2
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Rewrite Mode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you want seo like links, You need to do some additional work&lt;/p&gt;

&lt;p&gt;Refer 1: &lt;a href="https://www.digitalocean.com/community/tutorials/how-to-rewrite-urls-with-mod_rewrite-for-apache-on-ubuntu-20-04"&gt;Ubuntu - Enable Mod Rewrite&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Refer 2: &lt;a href="https://www.digitalocean.com/community/tutorials/how-to-configure-the-apache-web-server-on-an-ubuntu-or-debian-vps"&gt;Ubuntu - Enable Mod Rewrite&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /etc/apache2/sites-available/
vi default.conf or vi 000-default.conf
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Add following section to the one of the above mentioned file after CustomLog.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;Directory /var/www/html&amp;gt;
    Options Indexes FollowSymLinks
    AllowOverride all
    Require all granted
&amp;lt;/Directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;Enable mod rewrite and restart apache&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a2enmod rewrite 
systemctl apache2 restart
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Additional configuration&lt;/strong&gt; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Install phpMyAdmin&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker pull phpmyadmin/phpmyadmin
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create container for phpMyAdmin&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run -itd -p 2599:80 --name=lampphpmyadmin \
-e PMA_ARBITRARY=1 \
--network=lampstack \
phpmyadmin/phpmyadmin
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>docker</category>
      <category>ubuntu</category>
      <category>lamp</category>
    </item>
    <item>
      <title>Stop loss Calculator</title>
      <dc:creator>vkuberan@gmail.com</dc:creator>
      <pubDate>Sun, 23 May 2021 11:12:23 +0000</pubDate>
      <link>https://dev.to/vkuberan_88/stop-loss-calculator-15n2</link>
      <guid>https://dev.to/vkuberan_88/stop-loss-calculator-15n2</guid>
      <description>&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/vkuberan83/embed/VwppRwE?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>codepen</category>
    </item>
  </channel>
</rss>
