Categories
AWS

How to make AWS Snapshot backup ?

The top priority of a developer is to have backups at any point of time.

To have peace of mind I suggest the followingsteps proposed by Amazon AWS when having an EC2 instance

https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/TakeScheduledSnapshot.html

Categories
Technical

How to Make your websites stronger against DDOS ?

I found myself dealing with web server being down, being daily attacked online. My remedy to all of these problems is cloudfare

cloudfare
cloudfare
cloudfare ddos
cloudfare ddos
Categories
Unix

How to start a httpd service when rebooting linux ?

How to make sure your service starts when you server reboot? It is practical so you do not have to ssh into your machine everytime you want to start your web server. Find below the command used for that effect

sudo chkconfig --levels 0123456 httpd on

Here explanation of levels

0   Halt
1   Single-User mode
2   Multi-user mode console logins only (without networking)
3   Multi-User mode, console logins only
4   Not used/User-definable
5   Multi-User mode, with display manager as well as console logins (X11)
6   Reboot

Make it happen – Automate things become a senior software engineer

Categories
General

How to Force/change default homepage of Laravel Nova ?

To Force the redirect of Laravel Nova I proceeded with modifications

#1 – Remove the default route definition

routes/web.php
routes/web.php

#2 – Address the ‘/nova’ path to just ‘/’

config/nova.php
config/nova.php
Categories
Technical

How to check the Health Status of your servers for free ?

It has been on my mind for a long time … How to get notified when one of my web properties go down . I found this amazing free website tool called UPTIME ROBOT – Get notified for free and stay on the top of your business

https://uptimerobot.com/

uptimerobot
uptimerobot moniotor server health

Categories
Laravel

How to force Laravel to return SSL connection calls ?

It has been a pretty long day as I was struggling to get a Laravel application to return SSL or HTTPS connections. I was put in this situation because the SysOp team of my company placed the laravel app behind a loadbalancer accepting SSL connections but converting these connection to HTTP.

It seems trivial but it did mess with the laravel application that relies on the incoming protocol to define login/logout url pages for instances

After messing up and discovering TrustProxies I found an easy solution with

Here is my solution , open the file app/Providers/AppServiceProvider.php

And add the following line URL::forceScheme('https');

<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
      URL::forceScheme('https');
    }
}
Categories
Nginx

How to configure your Nginx Virtual Host ?

Hi team, here is what to add in your nginx configuration file to resolve the desired virtual host name

 server_name example.com www.example.com;
Categories
BEST PHP CODE PHP

How to address the undefined function yaml_parse_file ?

Here are the steps when you encounter the error below, it means that the yaml library is missing as it is not native to php per say

undefined function yaml_parse_file

Install YAML library for PHP when you see the error below

yum search yaml

First step is to install yaml via pecl

pecl install yaml-2.0.0

Second step is to create the following file

/etc/php/conf.d/ext-yaml.ini

And add the following line

echo "extension=yaml.so"

Then restart php server

service php-fpm restart
Categories
BEST PHP CODE PHP

How to setup a CRON JOB for apache/httpd to restart automatically ?


Very helpful website top figure out crontab sequence

https://crontab.guru/#0_0_*_*_*

Every 30 minutes 

/etc/crontab

  */30  *  *  *  *       root /etc/init.d/httpd restart > /dev/null 2>&1

  */30  *  *  *  *       root /etc/init.d/mysql restart > /dev/null 2>&1

Every hour

/etc/crontab

  0  *  *  *  *       root /etc/init.d/httpd restart > /dev/null 2>&1

Every minute

/etc/crontab

  *  *  *  *  *       root /etc/init.d/httpd restart > /dev/null 2>&1

Check logs 

tail n- 200  /var/log/cron

tail n- 200  /var/log/messages

Plus link here regarding dev/null 2>&1

————————————————————————

Categories
Satori Architect

How to update BCC Architect Software ?

If you are confronted with the following issue with BCC Architect, the best solution is to take the latest updates available on their website https://portal.bccsoftware.com/

Error: 404 ISSUE WriteMailDatToZip MRE1=92 -2147220468 SaveReport failed to save the file “0106A220” for report 364. (error 8004040c)

Download on this page