Skip to content

Instantly share code, notes, and snippets.

Avatar

Santosh Achari santoshachari

View GitHub Profile
View New user on Ubuntu.md

Steps to Create a New Sudo User

  1. Log in to your server as the root user.
ssh root@server_ip_address
  1. Use the adduser command to add a new user to your system.
@santoshachari
santoshachari / Laravel on LEMP Debug.md
Created May 21, 2016
Debugging Laravel applications on LEMP
View Laravel on LEMP Debug.md

Logging is done in two places:

  1. storage/logs/laravel.log
  2. /var/log/nginx/error.log

Clear logs with:

> laravel.log
sudo bash -c '>error.log' #for nginx
@santoshachari
santoshachari / Virtual Blocks on Nginx.md
Last active Mar 19, 2021
Setup additional sites on Nginx
View Virtual Blocks on Nginx.md

Inspired and edited from this Digital Ocean tutorial.

Follow the steps on this gist to setup a LEMP stack with PHP 7.0.

The steps assume Nginx has been configured correctly.

Setup the root directories

For the domains example.com and test.com, create the folders.

@santoshachari
santoshachari / Laravel PHP7 LEMP AWS.md
Last active Jul 12, 2021
Laravel 5.x on Ubuntu 16.x, PHP 7.x, Nginx 1.9.x
View Laravel PHP7 LEMP AWS.md

#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@santoshachari
santoshachari / nginx.default.conf
Last active Feb 22, 2022 — forked from sumardi/nginx.default.conf
PHP5.6 and NGINX: Install PHP56-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
View nginx.default.conf
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and php56-FPM
sudo yum install -y nginx php56-fpm
# Install php56 extensions
sudo yum install -y php56-devel php-mysql php56-pdo php56-pear php56-mbstring php56-cli php56-odbc php56-imap php56-gd php56-xml php56-soap