Skip to content

Instantly share code, notes, and snippets.

View nahidacm's full-sized avatar

Mahmudur Rahman nahidacm

  • Dhaka, Bangladesh
View GitHub Profile
sudo yum install epel-release -y
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm -y
sudo yum install yum-utils -y
sudo yum-config-manager --enable remi-php72 -y
sudo yum update -y
sudo yum install php72 -y
sudo yum install php72-php-bcmath php72-php-ctype php72-php-curl php72-php-dom php72-php-gd php72-php-hash php72-php-iconv php72-php-intl php72-php-mbstring php72-php-openssl php72-php-pdo_mysql php72-php-simplexml php72-php-soap php72-php-xsl php72-php-pecl-zip php72-php-pecl-redis php72-php-fpm php72-php-json php72-php-mbstring php72-php-mysqlnd php72-php-xml php72-php-xmlrpc php72-php-opcache -y
sudo yum install httpd -y
sudo systemctl start httpd
sudo systemctl enable httpd
@nahidacm
nahidacm / apach-host.conf
Created January 20, 2021 10:01
Apache headers to avoid CORS
Header always set Access-Control-Allow-Origin "http://localhost:3000"
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
Header always set Access-Control-Max-Age "1000"
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
Header always set Access-Control-Allow-Credentials true
@nahidacm
nahidacm / docker-bash-alias
Last active October 19, 2022 04:29
Useful bash aliases
# for Ubuntu edit the file ~/.bash_aliases
# for Centos / Redhat edit the file ~/.bashrc
dex()
{
docker exec -it "$1" /bin/bash
}
alias dps='docker ps'
server {
listen 80;
server_name epiclabs23.com;
access_log /var/log/nginx/epiclabs23.com.log;
error_log /var/log/nginx/epiclabs23.com.error.log;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
@nahidacm
nahidacm / ubuntu-provision.sh
Last active June 5, 2023 10:44
Provisioning a base ubuntu docker image for production
apt update
# Install curl
apt install curl -y
# Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
source ~/.bashrc
# Install preffered one
nvm install --lts