Skip to content

Instantly share code, notes, and snippets.

View sheikhwaqas's full-sized avatar

Waqas Ashraf sheikhwaqas

View GitHub Profile
@sheikhwaqas
sheikhwaqas / vhost.conf
Last active September 30, 2021 09:54
Nginx Configuration for Laravel 8.x Deployment
server {
listen 80;
listen [::]:80;
server_name <domain_name>;
root <document_root>;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
########################################################################
# Installing and Configuring Apache & Nginx with Multiple PHP Versions #
# Apache will run on port 8080 and will be behind Nginx #
# Nginx will serve as a reverse proxy for Apache Sites #
# Nginx will act as the primary web and caching server #
########################################################################
# Update Packages
sudo apt update && sudo apt upgrade -y

Keybase proof

I hereby claim:

  • I am sheikhwaqas on github.
  • I am sheikhwaqas (https://keybase.io/sheikhwaqas) on keybase.
  • I have a public key ASAKmnco7goOktG8mZzZlAGmHelvaZu8joSYtU_C3Zem-go

To claim this, I am signing this object:

@sheikhwaqas
sheikhwaqas / P12toPEM.txt
Created October 10, 2018 11:55 — forked from shahdhiren/P12toPEM.txt
Convert P12 file for Push Notification to PEM format
Development Phase:
Step 1: Create Certificate .pem from Certificate .p12
Command: openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
Step 2: Create Key .pem from Key .p12
Command : openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
Step 3: Optional (If you want to remove pass phrase asked in second step)
Command : openssl rsa -in apns-dev-key.pem -out apns-dev-key-noenc.pem
@sheikhwaqas
sheikhwaqas / install-docker.sh
Created April 9, 2018 13:11
Install Docker & Docker-Compose on Ubuntu 16.04 LTS (Xenial). Run this file with sudo.
# Install Pre-requisites
apt update
apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt update
# Install Docker CE
apt install docker-ce -y
@sheikhwaqas
sheikhwaqas / docker-compose.yml
Last active October 3, 2022 14:40
Docker Compose configuration to run MySQL 5.6 and MySQL 5.7 on one instance. Create /var/lib/mysql56-data & /var/lib/mysql57-data with root as the owner of these directories before running docker-compose up -d
version: '3'
services:
mysql56:
image: mysql:5.6
restart: unless-stopped
container_name: mysql56-container
ports:
- "127.0.0.1:3356:3306"
environment:
MYSQL_ROOT_PASSWORD: rootPassword
@sheikhwaqas
sheikhwaqas / setup-lemp.sh
Last active July 31, 2020 14:08
Install the LEMP stack on Ubuntu 16.04 LTS with Composer, Ruby, Sass & Compass
###############################################################################
# Install nGinx and PHP 7 on Ubuntu 16.04 LTS
###############################################################################
# Install nGinx Server
apt install nginx
# Install PHP & and it's respective packages
apt install php-common php-fpm php-mysql php7.0-cli php7.0-common php7.0-fpm php7.0-json php7.0-mysql php7.0-opcache php7.0-readline php-bcmath php-bz2 php-calendar php-ctype php-curl php-date php-enchant php-gd php-intl php-mbstring php-mcrypt php-mongodb php-soap php-sqlite3 php-tidy php-xdebug php-xml php-xml-parser php-xml-rpc2 php-xml-serializer php-xml-svg php-xmlrpc php-zip
@sheikhwaqas
sheikhwaqas / setup-mongodb34-ubuntu16.sh
Last active September 17, 2020 09:55
Install mongoDB 3.4 on Ubuntu 16.04 LTS
###############################################################################
# Install mongoDB Server on Ubuntu 16.04 LTS
###############################################################################
# Import the Public Key used by the Ubuntu Package Manager
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
# Create a file list for mongoDB to fetch the current repository
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list
@sheikhwaqas
sheikhwaqas / setup-mysql57-ubuntu16.sh
Created April 11, 2017 14:13
Install MySQL Server 5.7 on Ubuntu 16.04 LTS
###############################################################################
# Install MySQL Server 5.7 on Ubuntu 16.04 LTS
###############################################################################
# Download and Install the Latest Updates for the OS
apt update && apt upgrade -y
# Install MySQL Server in a Non-Interactive mode. Default root password will be "root"
echo "mysql-server-5.7 mysql-server/root_password password root" | sudo debconf-set-selections
echo "mysql-server-5.7 mysql-server/root_password_again password root" | sudo debconf-set-selections
@sheikhwaqas
sheikhwaqas / gist:e26cd1fec78c1af986c8a269482e0e3e
Created January 6, 2017 09:26 — forked from learncodeacademy/gist:ebba574fc3f438c851ae
Nginx Node Frontend / Load Balancer / Static Assets Caching
upstream project {
server 22.22.22.2:3000;
server 22.22.22.3:3000;
server 22.22.22.5:3000;
}
server {
listen 80;
location / {