Skip to content

Instantly share code, notes, and snippets.

View moaalaa's full-sized avatar

Mohamed Alaa El-Din moaalaa

View GitHub Profile

Laravel + Soketi with SSL (cPanel and Apache)

This guide explains how to integrate Laravel with Soketi using secure WebSocket (WSS) over SSL via Apache. The key is to proxy wss:// connections through Apache with SSL termination, while Soketi itself runs unencrypted on localhost.


✅ Pre-requisites

  • Apache with mod_proxy, mod_proxy_http, mod_proxy_wstunnel, and mod_rewrite enabled.

  • Soketi server running and listening on port 6001.

## put the options in /etc/mysql/my.cnf file
-----------------------------------------------
sudo nano /etc/mysql/my.cnf && sudo service mysql restart
[mysqld]
innodb_buffer_pool_size = 4G
innodb_log_buffer_size = 256M
@moaalaa
moaalaa / 01 - Secure your new server.md
Last active December 4, 2025 16:34
Secure Server And Install cPanel

Secure your new server

All our commands are for AlmaLinux 9 and Ubuntu 24.04 only

Open Your ssh and start typing the following commands

Update System

# AlmaLinux 9
@moaalaa
moaalaa / 0- install nodejs and redis.sh
Last active February 13, 2025 11:12
How to run PM2 with laravel queue and laravel echo server
# Node Js
# Centos7
curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -
sudo yum install nodejs
# Ubuntu 20.04
curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
sudo apt install nodejs
@moaalaa
moaalaa / BroadcastServiceProvider.php
Last active March 18, 2025 12:15
Realtime work around
<?php
namespace MixCode\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
class BroadcastServiceProvider extends ServiceProvider
{
/**
@moaalaa
moaalaa / 01 - zsh.md
Last active October 25, 2025 18:51
For Every New Ubunut or Linux Mint

Installing ZSH

1. Install ZSH

# Ubuntu
sudo apt install zsh

# Fedora
sudo dnf install zsh
@bradtraversy
bradtraversy / webdev_online_resources.md
Last active November 19, 2025 14:28
Online Resources For Web Developers (No Downloading)
@bradtraversy
bradtraversy / ssh.md
Last active September 30, 2025 20:16
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh [email protected]

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@xirixiz
xirixiz / Set up GitHub push with SSH keys.md
Last active November 18, 2025 13:31 — forked from developius/README.md
Set up GitHub push with SSH keys

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "[email protected]"
@bradtraversy
bradtraversy / sample.md
Created March 23, 2018 18:17
Markdown Cheat Sheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This text is italic