GithubHelp home page GithubHelp logo

toanphambluecom / nginx-virtual-host-bash-script Goto Github PK

View Code? Open in Web Editor NEW

This project forked from magepsycho/nginx-virtual-host-bash-script

0.0 0.0 0.0 250 KB

Nginx Virtual Host Bash Script

Home Page: https://blog.magepsycho.com/

Shell 100.00%

nginx-virtual-host-bash-script's Introduction

Nginx Virtual Host Creator (Magento 1, Magento 2, Laravel, WordPress)

This Script creates Nginx virtual host for different applications.
Some of the supported applications are:

  • Magento 1
  • Magento 2
  • WordPress
  • Laravel
  • Html
  • Others

INSTALL

To install, simply download the script file and give it the executable permission.

curl -0 https://raw.githubusercontent.com/MagePsycho/nginx-virtual-host-bash-script/master/src/vhost-nginx.sh -o vhost-nginx.sh
chmod +x vhost-nginx.sh

To make it system wide command

sudo mv vhost-nginx.sh /usr/local/bin/vhost-nginx

OR
(may not work with sudo)

mv vhost-nginx.sh ~/bin/vhost-nginx

Make sure your $HOME/bin folder is in executable path

USAGE

To display help

sudo ./vhost-nginx.sh --help

To Create Virtual Host for Magento 1

sudo ./vhost-nginx.sh --domain=magento1938.test --app=magento1 --root-dir=/var/www/magento1/magento1938

To Create Virtual Host for Magento 2

sudo ./vhost-nginx.sh --domain=magento223ce.test --app=magento2 --root-dir=/var/www/magento2/magento223ce

To Create Virtual Host for WordPress

sudo ./vhost-nginx.sh --domain=wordpress494.test --app=wordpress --root-dir=/var/www/wordpress/wordpress494

To Create Virtual Host for Laravel

sudo ./vhost-nginx.sh --domain=laravel560.test --app=laravel --root-dir=/var/www/laravel/laravel560

To Create Virtual Host for Default (Html)

sudo ./vhost-nginx.sh --domain=website.test --app=laravel --root-dir=/var/www/html/website

Notes

  • In case of system-wide command, you can omit the --root-dir parameter if you run the command from the root directory of application.

Screenshots

Nginx Virtual Host Creator Help Screentshot - Nginx Virtual Host Creator Help

Nginx Virtual Host Creator Result Screentshot - Nginx Virtual Host Creator Result

RoadMap

  • To Support multiple applications:
    • Magento 1
    • Magento 2
    • WordPress
    • Laravel
    • Html
    • OroCrm
    • OroCommerce
    • etc.
  • Flexible settings for Nginx
    • fastcgi_pass: tcp port (127.0.0.1:9000) or unix socket (/var/run/php-fpm.sock)
  • Option to configure virtual host template from separate file.
  • Option to add SSL configuration

nginx-virtual-host-bash-script's People

Contributors

magepsycho avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.