- Notifications
You must be signed in to change notification settings - Fork15
Nginx Virtual Host Bash Script
NotificationsYou must be signed in to change notification settings
MagePsycho/nginx-virtual-host-bash-script
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This Script creates Nginx virtual host for different applications.
Some of the supported applications are:
- Magento 1
- Magento 2
- WordPress
- Laravel
- Html
Others
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.shchmod +x vhost-nginx.shTo make it system wide command
sudo mv vhost-nginx.sh /usr/local/bin/vhost-nginxOR
(may not work withsudo)
mv vhost-nginx.sh ~/bin/vhost-nginxMake sure your$HOME/bin folder is in executable path
sudo ./vhost-nginx.sh --helpsudo ./vhost-nginx.sh --domain=magento1938.test --app=magento1 --root-dir=/var/www/magento1/magento1938sudo ./vhost-nginx.sh --domain=magento223ce.test --app=magento2 --root-dir=/var/www/magento2/magento223cesudo ./vhost-nginx.sh --domain=wordpress494.test --app=wordpress --root-dir=/var/www/wordpress/wordpress494sudo ./vhost-nginx.sh --domain=laravel560.test --app=laravel --root-dir=/var/www/laravel/laravel560sudo ./vhost-nginx.sh --domain=website.test --app=laravel --root-dir=/var/www/html/websiteNotes
- In case of system-wide command, you can omit the
--root-dirparameter if you run the command from the root directory of application.
Screentshot - Nginx Virtual Host Creator Help
Screentshot - Nginx Virtual Host Creator Result
- 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
About
Nginx Virtual Host Bash Script
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.