Skip to content

Instantly share code, notes, and snippets.

View thanhoangxuannghiep's full-sized avatar

Nghiep Than thanhoangxuannghiep

View GitHub Profile
@thanhoangxuannghiep
thanhoangxuannghiep / PHP-NGINX-ON-UBUNTU.md
Last active March 13, 2019 03:25
PHP and Nginx on ubuntu

After created a topic talk about Install Nginx, PHP with homebrew on MacOS. I want to create small topic talk about PHP and Nginx on Ubuntu. I will show steps to install and configuration

1. Install Nginx

I'm sure that you can find many documents or topic talk about this. However, I want to create specific topic for myself. This is the way I remember any things after self-learing. Now, you can type following 2 commands

apt-get update && apt-get install -y nginx

Then, you can check status of your web server with command systemctl status nginx. If you see status is running, you can access the default Nginx landing page right now. Now, open your browser and enter localhost in your address bar. You are in default nginx landing page. On Ubuntu, nginx auto declares sub-folders for you, You don't need to run mkdir command as MacOS. In folder sites-available, you can see file default. You only need to edit this file to run yo

@thanhoangxuannghiep
thanhoangxuannghiep / Vagrant-Magento-MacOS.md
Last active March 13, 2019 03:27
MacOS, Vagrant and magento2

When I write this topic, I thought that someones might knew vagrant and don't care about my sharing. However, I don't care too :)). After long time to works, I found some issues with my teammate and I wanna to share with all of you. In my company, someone starts with ubuntu and apache. After probation time, Our TAs require them using nginx. Another side, someone installed PHP version 7.0 or higher, some project runs with PHP 5.6 or some ticket you implemented worked on your local but not work on other servers...Therefore, I have a motivation to introduce with you vagrant.

1. Overview

To resolve all of issues I told above, You need many virtual machines to reproduce, debug and test. For manage those virtual machines, Vagrant is a tool that you need.

2. To installation

For this article, I will talk about installing on MacOS.

First, You need install virtualbox with this command

brew cask install virtualbox

@thanhoangxuannghiep
thanhoangxuannghiep / Homebrew-PHP-Nginx-Mysq-Magento-On-MacOS.md
Last active September 6, 2018 17:23
How to install PHP, Nginx, Magento with homebrew on MacOS high sierra

After a long time to research and fix many issues. Now, my config has work fine. I want to create this article to share my experiences when I start work on MacOS.

First, I want to introduce about myself. I had learnt and worked on Windows OS when I was 15 years old. Then, on June-2017, I join into a company ecomerce. They develop base on Magento. They require me can be install and using Ubuntu OS. At that moment, I look like a student has just graduated althought I had 3 years experiences.

When I work on Windows OS, of course, I use third party to build enviroment. It's name is xampp. However, on Ubuntu OS, I must learn to install webserver(apache), mysql, record some commands in my memory. After 1 year, I buy for myself a Macbook pro and I decided install Nginx on MacOS. Why I did it? Because I heard from my partner, we just only config once time if we use nginx. Beside that, we will run nginx with php-fpm. It will improve about performance when we run a project has high level complicate.

All right, Talk