Skip to content

Instantly share code, notes, and snippets.

View bajpangosh's full-sized avatar
🛰️
Working from Moon

Bajpan Gosh bajpangosh

🛰️
Working from Moon
View GitHub Profile
@bajpangosh
bajpangosh / Install and Test Sendmail on Ubuntu VPS.txt
Created June 15, 2016 06:44
Install and Test Sendmail on Ubuntu VPS
sudo apt-get install php-pear
sudo pear install mail
sudo pear install Net_SMTP
sudo pear install Auth_SASL
sudo pear install mail_mime
@bajpangosh
bajpangosh / WordPress+Cloudflare Full SSL - Nginx Configuration
Created May 26, 2016 07:24
WordPress+Cloudflare Full SSL - Nginx Configuration
# HTTP Server
server {
listen 80;
server_name yourwebsitename.com www.yourwebsitename.com;
rewrite ^ https://$server_name$request_uri permanent;
}
# HTTPS Server
server {
listen 443;
@bajpangosh
bajpangosh / NGINX.conif
Last active December 7, 2017 10:53
NGINX .conif tuning for Maximum performance
user www-data;
worker_processes auto;
pid /run/nginx.pid;
worker_rlimit_nofile 100000;
error_log /var/log/nginx/error.log crit;
events {
worker_connections 4000;
@bajpangosh
bajpangosh / Change VPS time zone
Created December 13, 2017 16:40
Change VPS time zone
On Ubuntu/Debian distros, you can easily change the timezone by running the command :
sudo dpkg-reconfigure tzdata
You will be prompt with a list of timezones that you can select from.
@bajpangosh
bajpangosh / How to Convert AdSense Hosted to Non-hosted Account
Created January 10, 2018 13:02
How to Convert AdSense Hosted to Non-hosted Account
https://www.google.com/adsense/app?hl=en&noaccount=false#main/upgrade
@bajpangosh
bajpangosh / WordPress+Cloudflare Full SSL - Nginx Configuration v3
Last active February 7, 2018 11:47
WordPress+Cloudflare Full SSL - Nginx Configuration v3
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
root /var/www/example.com;
index index.html index.htm index.php;
server_name example.com www.example.com;
location / {
#try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
@bajpangosh
bajpangosh / php7.0 WordPress or other CMS PHP modules
Last active February 24, 2018 03:21
php7.0 WordPress or other CMS PHP modules
The following PHP modules which can come in handy in case you are planning to install WordPress or other CMS.
sudo apt-get install -y php7.0-tidy php7.0 php7.0-fpm php7.0-mysql php-curl php-gd php-mcrypt php-pear php7.0-mbstring php-memcached php7.0-gmp php-zip
@bajpangosh
bajpangosh / php7
Created April 14, 2018 12:24
ex.php
apt-get -y install php7.0-fpm php7.0-curl php7.0-gd php7.0-imap php7.0-mcrypt php7.0-readline php7.0-common php7.0-recode php7.0-mysql php7.0-cli php7.0-curl php7.0-mbstring php7.0-bcmath php7.0-mysql php7.0-opcache php7.0-zip php7.0-xml php-memcached php-imagick php-memcache memcached graphviz php-pear php-xdebug php-msgpack php7.0-soap
@bajpangosh
bajpangosh / keybase.md
Created February 26, 2019 18:35
keybase.md

Keybase proof

I hereby claim:

  • I am bajpangosh on github.
  • I am bajpangosh (https://keybase.io/bajpangosh) on keybase.
  • I have a public key ASCQrbxcN1Zg4c_dRFqTO7wunY82OaU5e0eK8qFpzUc06Ao

To claim this, I am signing this object:

@bajpangosh
bajpangosh / Nginx Rewrites for Rank Math Sitemaps
Created March 13, 2019 05:47
Nginx Rewrites for Rank Math Sitemaps
# START Nginx Rewrites for Rank Math Sitemaps
rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
# END Nginx Rewrites for Rank Math Sitemaps