<?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 Muhammad Naeem on Medium]]></title>
        <description><![CDATA[Stories by Muhammad Naeem on Medium]]></description>
        <link>https://medium.com/@mnaiem262?source=rss-020f2047a31e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*DFI1zXG54_1PhkYL</url>
            <title>Stories by Muhammad Naeem on Medium</title>
            <link>https://medium.com/@mnaiem262?source=rss-020f2047a31e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 08:50:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mnaiem262/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[PROJECT-3: Here’s a step-by-step guide to set up a LEMP stack (Linux, Nginx, MySQL, PHP) for…]]></title>
            <link>https://medium.com/@mnaiem262/heres-a-step-by-step-guide-to-set-up-a-lemp-stack-linux-nginx-mysql-php-for-wordpress-8cb896a147c7?source=rss-020f2047a31e------2</link>
            <guid isPermaLink="false">https://medium.com/p/8cb896a147c7</guid>
            <dc:creator><![CDATA[Muhammad Naeem]]></dc:creator>
            <pubDate>Thu, 13 Feb 2025 14:26:19 GMT</pubDate>
            <atom:updated>2025-02-15T16:04:26.511Z</atom:updated>
            <content:encoded><![CDATA[<h3>PROJECT-3: Here’s a step-by-step guide to set up a LEMP stack (Linux, Nginx, MySQL, PHP) for WordPress:</h3><h3>Step 1: Update System Packages</h3><pre>sudo apt update &amp;&amp; sudo apt upgrade -y</pre><h3>Step 2: Install Nginx</h3><ol><li>Install Nginx:</li></ol><pre>sudo apt install nginx -y</pre><p>2. Start and enable Nginx:</p><pre>sudo systemctl start nginx<br>sudo systemctl enable nginx</pre><p>3. Allow HTTP/HTTPS traffic in the firewall:</p><pre>sudo ufw allow &#39;Nginx Full&#39;</pre><h3>Step 3: Install MySQL</h3><ol><li>Install MySQL Server:</li></ol><pre>sudo apt install mysql-server -y</pre><p>2. Secure MySQL installation:</p><pre>sudo mysql_secure_installation</pre><p>Follow prompts to set a root password and secure settings.</p><p>2. Create a WordPress database and user:</p><pre>sudo mysql -u root -p<br>-- Enter MySQL root password<br>CREATE DATABASE wordpress;<br>CREATE USER &#39;wpuser&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;your_strong_password&#39;;<br>GRANT ALL PRIVILEGES ON wordpress.* TO &#39;wpuser&#39;@&#39;localhost&#39;;<br>FLUSH PRIVILEGES;<br>EXIT;</pre><h3>Step 4: Install PHP</h3><ol><li>Install PHP and required extensions:</li></ol><pre>sudo apt install php-fpm php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip -y</pre><p>2. Check the PHP-FPM version (e.g., php8.1 or php7.4):</p><pre>php -v</pre><p>Adjust the version in the next steps if needed.</p><h3>Step 5: Configure Nginx for WordPress</h3><ol><li>Create a new server block configuration:</li></ol><pre>sudo nano /etc/nginx/sites-available/wordpress</pre><p>2. Paste the following configuration (replace your_domain with your actual domain):</p><pre>server {<br>    listen 80;<br>    server_name your_domain www.your_domain;<br>    root /var/www/wordpress;<br>    index index.php index.html index.htm;<br><br>    location / {<br>        try_files $uri $uri/ /index.php?$args;<br>    }<br><br>    location ~ \.php$ {<br>        include snippets/fastcgi-php.conf;<br>        fastcgi_pass unix:/var/run/php/php-fpm.sock;<br>        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>        include fastcgi_params;<br>    }<br><br>    location ~ /\.ht {<br>        deny all;<br>    }<br>}</pre><p>3. Enable the site:</p><pre>sudo ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/</pre><p>4. Test Nginx configuration and restart:</p><pre>sudo nginx -t<br>sudo systemctl reload nginx</pre><h3>Step 6: Install WordPress</h3><ol><li>Download WordPress:</li></ol><pre>cd /tmp &amp;&amp; wget https://wordpress.org/latest.tar.gz<br>tar -xzvf latest.tar.gz</pre><p>2. Move files to the web directory:</p><pre>sudo mv wordpress /var/www/</pre><p>3. Set permissions:</p><pre>sudo chown -R www-data:www-data /var/www/wordpress<br>sudo chmod -R 755 /var/www/wordpress</pre><h3>Step 7: Configure WordPress</h3><ol><li>Rename the sample config file:</li></ol><pre>cd /var/www/wordpress<br>sudo cp wp-config-sample.php wp-config.php<br>sudo nano wp-config.php</pre><p>2. Update database settings:</p><pre>define( &#39;DB_NAME&#39;, &#39;wordpress&#39; );<br>define( &#39;DB_USER&#39;, &#39;wpuser&#39; );<br>define( &#39;DB_PASSWORD&#39;, &#39;your_strong_password&#39; );<br>define( &#39;DB_HOST&#39;, &#39;localhost&#39; );</pre><h3>Step 8: Complete Installation via Browser</h3><ol><li>Visit http://your_domain in your browser.</li><li>Follow the WordPress setup wizard to finish installation.</li></ol><h3>Optional: Secure with SSL (Let’s Encrypt)</h3><ol><li>Install Certbot:</li></ol><pre>sudo apt install certbot python3-certbot-nginx -y</pre><p>2. Obtain SSL certificate:</p><pre>sudo certbot --nginx -d your_domain -d www.your_domain</pre><p>Your WordPress site is now running on a LEMP stack. Access the admin dashboard at <a href="http://your_domain/wp-admin.">http://your_domain/wp-admin.</a></p><p><strong>Note:</strong> Replace placeholders like your_domain, wpuser, and your_strong_password with your actual values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tCyB_t9FvfjPgVEwe6syBA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8cb896a147c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PROJECT-2: Here’s a step-by-step guide to set up OpenVPN on your CentOS 8 server in Dubai:]]></title>
            <link>https://medium.com/@mnaiem262/heres-a-step-by-step-guide-to-set-up-openvpn-on-your-centos-8-server-in-dubai-126c6a0ab971?source=rss-020f2047a31e------2</link>
            <guid isPermaLink="false">https://medium.com/p/126c6a0ab971</guid>
            <dc:creator><![CDATA[Muhammad Naeem]]></dc:creator>
            <pubDate>Wed, 12 Feb 2025 07:45:32 GMT</pubDate>
            <atom:updated>2025-02-15T16:04:00.978Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. Update System Packages</h3><pre>sudo dnf update -y<br>sudo reboot</pre><h3>2. Install OpenVPN and Dependencies</h3><pre>sudo dnf install -y openvpn easy-rsa</pre><h3>3. Set Up PKI (Public Key Infrastructure)</h3><pre>mkdir -p ~/easy-rsa/keys<br>cp -r /usr/share/easy-rsa/3/* ~/easy-rsa<br>cd ~/easy-rsa</pre><h3>4. Configure CA Variables</h3><pre>cat &gt; vars &lt;&lt;EOF<br>set_var EASYRSA_REQ_COUNTRY &quot;AE&quot;<br>set_var EASYRSA_REQ_PROVINCE &quot;Dubai&quot;<br>set_var EASYRSA_REQ_CITY &quot;Dubai&quot;<br>set_var EASYRSA_REQ_ORG &quot;Your-Organization-Name&quot;<br>set_var EASYRSA_REQ_EMAIL &quot;admin@yourdomain.com&quot;<br>set_var EASYRSA_REQ_OU &quot;IT&quot;<br>set_var EASYRSA_ALGO &quot;ec&quot;<br>set_var EASYRSA_DIGEST &quot;sha512&quot;<br>EOF</pre><h3>5. Initialize PKI</h3><pre>./easyrsa init-pki<br>./easyrsa build-ca nopass</pre><h3>6. Generate Server Certificte</h3><pre>./easyrsa gen-req server nopass<br>./easyrsa sign-req server server</pre><h3>7. Generate Client Certificate (repeat for each client)</h3><pre>./easyrsa gen-req client1 nopass<br>./easyrsa sign-req client client1</pre><h3>8. Generate DH Parameters and HMAC</h3><pre>./easyrsa gen-dh<br>openvpn --genkey --secret ta.key</pre><h3>9. Copy Certificates to OpenVPN Directory</h3><pre>sudo cp ~/easy-rsa/pki/ca.crt /etc/openvpn/server/<br>sudo cp ~/easy-rsa/pki/issued/server.crt /etc/openvpn/server/<br>sudo cp ~/easy-rsa/pki/private/server.key /etc/openvpn/server/<br>sudo cp ~/easy-rsa/pki/dh.pem /etc/openvpn/server/<br>sudo cp ~/easy-rsa/ta.key /etc/openvpn/server/</pre><h3>10. Create Server Configuration</h3><pre>sudo nano /etc/openvpn/server/server.conf</pre><p>Paste this configuration (adjust as needed):</p><pre>port 1194<br>proto udp<br>dev tun<br>ca ca.crt<br>cert server.crt<br>key server.key<br>dh dh.pem<br>server 10.8.0.0 255.255.255.0<br>ifconfig-pool-persist ipp.txt<br>push &quot;redirect-gateway def1 bypass-dhcp&quot;<br>push &quot;dhcp-option DNS 8.8.8.8&quot;<br>push &quot;dhcp-option DNS 8.8.4.4&quot;<br>keepalive 10 120<br>tls-auth ta.key 0<br>cipher AES-256-GCM<br>auth SHA512<br>persist-key<br>persist-tun<br>status openvpn-status.log<br>verb 3<br>explicit-exit-notify 1<br>user nobody<br>group nobody</pre><h3>11. Configure Firewall</h3><pre>sudo firewall-cmd --add-service openvpn --permanent<br>sudo firewall-cmd --add-masquerade --permanent<br>sudo firewall-cmd --reload</pre><h3>12. Enable IP Forwarding</h3><pre>sudo echo &quot;net.ipv4.ip_forward = 1&quot; &gt;&gt; /etc/sysctl.conf<br>sudo sysctl -p</pre><h3>13. Start and Enable OpenVPN Service</h3><pre>sudo systemctl start openvpn-server@server<br>sudo systemctl enable openvpn-server@server</pre><h3>14. Create Client Configuration File (client.ovpn)</h3><pre>cat &gt; client.ovpn &lt;&lt;EOF<br>client<br>dev tun<br>proto udp<br>remote your_server_ip 1194<br>resolv-retry infinite<br>nobind<br>persist-key<br>persist-tun<br>remote-cert-tls server<br>cipher AES-256-GCM<br>auth SHA512<br>verb 3<br>&lt;ca&gt;<br>$(cat ~/easy-rsa/pki/ca.crt)<br>&lt;/ca&gt;<br>&lt;cert&gt;<br>$(cat ~/easy-rsa/pki/issued/client1.crt)<br>&lt;/cert&gt;<br>&lt;key&gt;<br>$(cat ~/easy-rsa/pki/private/client1.key)<br>&lt;/key&gt;<br>&lt;tls-auth&gt;<br>$(cat ~/easy-rsa/ta.key)<br>&lt;/tls-auth&gt;<br>key-direction 1<br>EOF</pre><p>To use your client.openvpn configuration file on your CentOS Stream 9 PC, follow these steps:</p><h3>1. Rename the File (Optional)</h3><p>OpenVPN typically uses .ovpn or .conf extensions for configuration files. Rename your file for clarity (optional but recommended):</p><pre>mv client.openvpn client.conf</pre><h3>2. Move the Configuration File</h3><p>Place your configuration file in the OpenVPN client directory:</p><pre>sudo mkdir -p /etc/openvpn/client/  # Create the directory if it doesn&#39;t exist<br>sudo cp client.conf /etc/openvpn/client/</pre><h3>3. Verify Certificates/Keys</h3><p>Open the configuration file to check if it references certificates or keys (e.g., ca.crt, client.crt, client.key):</p><pre>sudo nano /etc/openvpn/client/client.conf</pre><p>Ensure all file paths in the config (e.g., ca ca.crt) point to valid locations.<br>If certificates are bundled with the .openvpn file, copy them to /etc/openvpn/client/ and update their paths in the config.</p><h3>4. Set Correct Permissions</h3><p>Ensure the configuration file and certificates are secure:</p><pre>sudo chown root:root /etc/openvpn/client/client.conf<br>sudo chmod 600 /etc/openvpn/client/client.conf</pre><h3>5. Start the OpenVPN Connection</h3><p>Start the VPN service using your configuration:</p><pre>sudo systemctl start openvpn-client@client</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F3XQVunXCM3xsdeQorSjqg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=126c6a0ab971" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PROJECT-1: step-by-step guide to set up a LAMP stack (Linux, Apache, MySQL, PHP) for WordPress.]]></title>
            <link>https://medium.com/@mnaiem262/step-by-step-guide-to-set-up-a-lamp-stack-linux-apache-mysql-php-for-wordpress-a71f1bd7e60e?source=rss-020f2047a31e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a71f1bd7e60e</guid>
            <dc:creator><![CDATA[Muhammad Naeem]]></dc:creator>
            <pubDate>Tue, 04 Feb 2025 07:29:52 GMT</pubDate>
            <atom:updated>2025-02-15T16:02:50.557Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. Update System Packages</h3><pre>sudo apt update &amp;&amp; sudo apt upgrade -y</pre><h3>2. Install Apache Web Server</h3><pre>sudo apt install apache2 -y<br>sudo systemctl start apache2<br>sudo systemctl enable apache2</pre><p><strong>Verify Apache</strong>:<br>Visit http://&lt;your-server-IP&gt; in a browser. You should see the Apache default page.</p><h3>3. Install MySQL Database</h3><pre>sudo apt install mysql-server -y<br>sudo systemctl start mysql<br>sudo systemctl enable mysql</pre><p><strong>Secure MySQL Installation</strong>:</p><pre>sudo mysql_secure_installation</pre><ul><li>Follow prompts to set a root password and disable insecure defaults.</li></ul><h3>4. Install PHP and Required Extensions</h3><pre>sudo apt install php libapache2-mod-php php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-zip php-soap php-intl -y</pre><p><strong>Restart Apache</strong>:</p><pre>sudo systemctl restart apache2</pre><h3>5. Create a Database for WordPress</h3><ol><li>Log into MySQL:</li></ol><pre>sudo mysql -u root -p</pre><p>2. Run these SQL commands:</p><pre>CREATE DATABASE wordpress;<br>CREATE USER &#39;wpuser&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;StrongPassword123!&#39;;<br>GRANT ALL PRIVILEGES ON wordpress.* TO &#39;wpuser&#39;@&#39;localhost&#39;;<br>FLUSH PRIVILEGES;<br>EXIT;</pre><h3>6. Test PHP Processing</h3><p>Create a test PHP file:</p><pre>sudo nano /var/www/html/info.php</pre><p>Add this line:</p><pre>&lt;?php phpinfo(); ?&gt;</pre><p>Visit http://&lt;your-server-IP&gt;/info.php to verify PHP works. Delete this file afterward for security:</p><pre>sudo rm /var/www/html/info.php</pre><h3>7. Download and Configure WordPress</h3><pre>cd /tmp<br>wget https://wordpress.org/latest.tar.gz<br>tar -xzvf latest.tar.gz<br>sudo mv wordpress /var/www/html/</pre><p><strong>Set Permissions:</strong></p><pre>sudo chown -R www-data:www-data /var/www/html/wordpress<br>sudo chmod -R 755 /var/www/html/wordpress</pre><h3>8. Configure Apache Virtual Host</h3><ol><li>Create a config file:</li></ol><pre>sudo nano /etc/apache2/sites-available/wordpress.conf</pre><ol><li>Add this configuration:</li></ol><pre>&lt;VirtualHost *:80&gt;<br>    ServerAdmin admin@example.com<br>    DocumentRoot /var/www/html/wordpress<br>    ServerName your-domain.com<br>    ServerAlias www.your-domain.com<br><br>    &lt;Directory /var/www/html/wordpress&gt;<br>        AllowOverride All<br>        Require all granted<br>    &lt;/Directory&gt;<br><br>    ErrorLog ${APACHE_LOG_DIR}/error.log<br>    CustomLog ${APACHE_LOG_DIR}/access.log combined<br>&lt;/VirtualHost&gt;</pre><ol><li>Enable the site and disable the default:</li></ol><pre>sudo a2ensite wordpress.conf<br>sudo a2dissite 000-default.conf<br>sudo systemctl restart apache2</pre><h3>9. Set Up SSL (Optional but Recommended)</h3><p>Use Let’s Encrypt to enable HTTPS:</p><pre>sudo apt install certbot python3-certbot-apache -y<br>sudo certbot --apache -d your-domain.com -d www.your-domain.com</pre><h3>10. Complete WordPress Installation</h3><ol><li>Visit http://your-domain.com (or your server IP).</li><li>Follow the WordPress setup wizard:</li></ol><ul><li><strong>Database Name</strong>: wordpress</li><li><strong>Username</strong>: wpuser</li><li><strong>Password</strong>: StrongPassword123!</li><li><strong>Database Host</strong>: localhost</li><li><strong>Table Prefix</strong>: Keep default or change for security.</li></ul><h3>Final Steps</h3><ul><li><strong>Security</strong>:</li><li>Use strong <strong>passwords</strong> for <strong>MySQL </strong>and <strong>WordPress admin</strong>.</li><li>Install a WordPress security plugin (e.g., Wordfence).</li><li><strong>Performance</strong>:</li><li>Enable caching (e.g., W3 Total Cache).</li><li>Use a CDN (e.g., Cloudflare).</li><li><strong>Backups</strong>:</li><li>Set up automated backups with plugins like UpdraftPlus.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pLltGmXhH0KU5pIJFqV8-A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a71f1bd7e60e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>