<?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 Harvinder Athwal on Medium]]></title>
        <description><![CDATA[Stories by Harvinder Athwal on Medium]]></description>
        <link>https://medium.com/@harvindersa?source=rss-d00e21677cca------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*olxxYSHtcFVv0kYaCehyiQ.jpeg</url>
            <title>Stories by Harvinder Athwal on Medium</title>
            <link>https://medium.com/@harvindersa?source=rss-d00e21677cca------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 05:26:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@harvindersa/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[Ubuntu Command for LAMP Setup and Configuration]]></title>
            <link>https://harvindersa.medium.com/ubuntu-command-for-lamp-setup-and-configuration-ca438ad84aae?source=rss-d00e21677cca------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca438ad84aae</guid>
            <category><![CDATA[server-setup]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[cheatsheet]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Harvinder Athwal]]></dc:creator>
            <pubDate>Thu, 03 Mar 2022 11:28:48 GMT</pubDate>
            <atom:updated>2022-03-03T11:42:45.289Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Sudo Command" src="https://cdn-images-1.medium.com/max/1024/1*IIYWL95ur9dNwtkvvmlScg.jpeg" /></figure><p>LAMP stands for Linux, Apache, MySQL &amp; PHP. I added the basic command and steps for LAMP Set up and Configuration</p><p><strong>Basic Setup</strong></p><pre>sudo apt update &amp;&amp; sudo apt install apache2 -y &amp;&amp; sudo apt install mysql-server -y &amp;&amp; sudo apt install php libapache2-mod-php php-mysql -y</pre><p>sudo apt update : will update your system &amp;</p><p>sudo apt install apache2 -y : will install apache2&amp;</p><p>sudo apt install mysql-server -y : will install MySQL &amp;</p><p>sudo apt install php libapache2-mod-php php-mysql -y : will install PHP latest version.</p><p><strong>Change to Root User</strong></p><pre>sudo su -<br>or<br>sudo -i</pre><p><strong>Enable MB String</strong></p><p>sudo apt install php-mbstring</p><h4><strong>Enable XML</strong></h4><pre>sudo apt install php-xml</pre><h4><strong>Update Apache Version To Lastest</strong></h4><pre>sudo add-apt-repository ppa:ondrej/apache2 </pre><pre>sudo apt update</pre><pre>sudo apt install apache2</pre><p><strong>Check PHP Version</strong></p><pre>php -v</pre><p><strong>Check Apache Version</strong></p><pre>apache2 -v</pre><p><strong>Enable Rewrite Module</strong></p><pre><em>sudo a2enmod rewrite</em></pre><p><strong><em>Enable Header Module</em></strong></p><pre>sudo a2enmod headers</pre><p><strong>Install Curl</strong></p><p>sudo apt-get install php-curl</p><p><strong>Apache2 restart</strong></p><pre>sudo service apache2 restart<br><em>systemctl restart apache2</em></pre><p><strong><em>Check Error Log</em></strong></p><pre>sudo tail -f /var/log/apache2/error.log</pre><h4><strong>Enable HSTS in </strong>other-vhosts-access-log.conf</h4><pre>Header always set Strict-Transport-Security &quot;max-age=63072000; includeSubdomains; preload&quot;</pre><h4>Default set 404 Page in other-vhosts-access-log.conf</h4><pre>&lt;VirtualHost *:80&gt;ServerName default<br> Redirect 404 /<br>&lt;/VirtualHost&gt;</pre><h4><strong>Website Setup in other-vhosts-access-log.conf</strong></h4><pre>&lt;VirtualHost *:80 *:443&gt;<br>DocumentRoot /var/www/html/<a href="http://abc.thriwe.com/">abc.thriwe.com</a><br>ServerName <a href="http://abc.thriwe.com/">abc.thriwe.com</a><br>ServerAlias <a href="http://abc.thriwe.com/">abc.thriwe.com</a><br> &lt;Directory /var/www/html/<a href="http://abc.thriwe.com/">abc.thriwe.com</a> &gt;<br> Options FollowSymLinks<br> AllowOverride All<br> Order allow,deny<br> allow from all<br>  RewriteEngine On<br># SSL connection forced<br>RewriteCond %{HTTP:X-Forwarded-Proto} !https<br>RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]<br>RewriteCond %{REQUEST_FILENAME} !-f<br>RewriteCond %{REQUEST_FILENAME} !-d<br>RewriteRule ^(.*)$ index.php?args=$1 [L,QSA]<br>&lt;/Directory&gt;<br> LogLevel warn<br>&lt;/VirtualHost&gt;</pre><p><strong>Basic Commands</strong></p><p>Location change : Cd /foldername/foldername</p><p>Location Change(If already at some location and want to access folder at that location) : Cd foldername</p><p>Files info in folder : ll</p><p>Files names in folder : ls</p><p>Edit file : Sudo nano filename</p><p>save/override file : Ctrl + o + enter</p><p>Exit File : Ctrl + x</p><p>Exit Command : Ctrl + Z</p><p><strong>Change File/Folder to full permission</strong></p><pre>sudo chmod -R 0777 foldername or file</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca438ad84aae" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>