Skip to content

Instantly share code, notes, and snippets.

View mhrubel's full-sized avatar
🖥️
Programming

Mahamudul Hasan Rubel mhrubel

🖥️
Programming
View GitHub Profile
@mhrubel
mhrubel / Ubuntu Linux - Nginx Web Server - Full
Last active August 10, 2023 12:38
Install Nginx, PHP7.2-FPM, PHPmyAdmin, MariaDB, IonCube, LetsEncrypt SSL, Proftpd, Pure-FTPD, Postfix, Dovecot, SpamAssassin, Calm-V, Spam filter, Email Encryption, Email Signature, RainLoop and Roundcube Webmail, HTTP/2 on Ubuntu 18.04 / 18.10 Server (with all software's complete configuration)
Install Nginx, PHP7.2-FPM, PHPmyAdmin, MariaDB, IonCube, LetsEncrypt SSL, Pure-FTPD, Postfix, Dovecot, Email Encryption,
Email Signature, RainLoop and Roundcube Webmail on Ubuntu 18.04 / 18.10 Server (with all software's complete configuration)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
This is a complete Ubuntu Linux based web server for website hosting purpose. Built with the below components for good performance.
Also, I tried to make it as secure as possible.
DISCLAIMER: I'm making this guide just for my own purpose and needs. But, If it meets your requirements,
please feel free to use the command with your own responsibility. Remember, I'm not liable if any bad thing happens to your server.
My recommendation is to you that use the command on a testing server before using it in a production server.
@mhrubel
mhrubel / Full Apache2, Multi PHP & MariaDB - Web Server on Ubuntu 18.04 or later
Last active September 23, 2023 19:58
Full Installation and Configuration of Apache2, Multiple PHP, MariaDB, phpMyAdmin, LetsEncrypt, HTTP/2, IonCube, Postfix, Dovecot, SPF, DKIM, Roundcube Webmail and Files Permission Commands on Ubuntu 18.04 and 18.10 Web Server
Complete Installation and Configuration of Apache2, Multiple PHP, MariaDB, phpMyAdmin, LetsEncrypt,
HTTP/2, IonCube, Postfix, Dovecot, SPF, DKIM, Roundcube Webmail and
Files Permission Commands on Ubuntu 18.04 and 18.10 Web Server
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
This is a complete Ubuntu Linux based web server for Website, PHP, SSL, TLS, Database and Email hosting purpose.
Built with the below components for good performance. Also, I tried to make it as secure as possible.
@mhrubel
mhrubel / 01_postfix_installer.md
Created February 8, 2019 06:43 — forked from baronkis/01_postfix_installer.md
Postfix + Dovecot + Postgresql + Postfixadmin + Roundcube + Opendkim

Postfix Installer

Following script may be used for configuring complete and secure email server on fresh install of Ubuntu 18.04 LTS. It will probably work on other distributions using apt-get. After minor changes you'll be able to use it on other Linux distros.

What it does?

02_postfix.sh:

  • Install Postfix and configure it with TLS support.
  • Install Dovecot and configure it's transport on Postfix.
  • Download, extract and correct permissions for Postfixadmin.
  • Download, extract and correct permissions for Roundcube.
@mhrubel
mhrubel / hostname.conf
Created February 8, 2019 13:43 — forked from Bharat-B/hostname.conf
WHMCS nGINX rules for SSL / Non SSL
### NON SSL | STANDARD HTTP
server {
listen 80;
server_name domain.com;
root /path/to/whmcs;
index index.php index.html;
access_log /var/log/nginx/domain.com.log combined;
access_log /var/log/nginx/domain.com.bytes bytes;
error_log /var/log/nginx/domain.com.error.log error;
location / {
@mhrubel
mhrubel / update_billing_emails.php
Created February 8, 2019 13:48 — forked from Pierowheelz/update_billing_emails.php
Forces WHMCS to only send invoice related emails to the billing contact. This is done by temporarily updating the primary account's email address and contact info to that of the billing contact (ie. it's a hack). Add this to your .../includes/hooks/ folder.
<?php
if (!defined("WHMCS"))
die("This file cannot be accessed directly");
use WHMCS\Database\Capsule;
/*
* Temporarily updates the primary account's email address to that of the
* company's Billing contact upon creation of a new invoice so that invoices
* are not sent to the primary account holder.
@mhrubel
mhrubel / no_admin_confirm.php
Created February 8, 2019 13:52 — forked from jclarke/no_admin_confirm.php
Disables the confirm password feature in the WHMCS admin area. Place in includes/hooks
<?php
add_hook('AdminLogin', 1, function($vars) {
$_SESSION["AuthConfirmationTimestamp"] = \Carbon\Carbon::now()->timestamp;
});
add_hook('AdminAreaHeadOutput', 1, function($vars) {
$_SESSION["AuthConfirmationTimestamp"] = \Carbon\Carbon::now()->timestamp;
return '
<script type="text/javascript">
$(document).ready(function(){
<?php
/**
* Display Client's Credit Balance in Client Area
*
* @author WHMCMS
* @link www.whmcms.com
* @since WHMCS v6.0.0+
*/
<?php
if (!defined("WHMCS"))
die("This file cannot be accessed directly");
function sendTelegramMessage($pm) {
global $vars;
//$chat_id = (""); //Group
$chat_id = (""); //Channel
$tokenbot = ("");
@mhrubel
mhrubel / ambn.php
Created February 8, 2019 14:06 — forked from AminulBD/ambn.php
Bangla WordPress Number
<?php
/*
Plugin Name: Bangla Number For WordPress
Plugin URI: https://aminul.net/
Description: Translate all number to bangla.
Version: 1.0.0
Author: Aminul Islam
Author URI: https://aminul.net/
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@mhrubel
mhrubel / bd-geo-code.sql
Created February 8, 2019 14:06 — forked from AminulBD/bd-geo-code.sql
BD GEO Code SQL Database
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET NAMES utf8mb4;
DROP TABLE IF EXISTS `districts`;
CREATE TABLE `districts` (
`id` int(11) NOT NULL AUTO_INCREMENT,