https://github.com/wildan3105/ng-crud
:rocket: An automatic CRUD (create, read, update, delete) operation for virtual host using Nginx
https://github.com/wildan3105/ng-crud
crud nginx virtual-hosts
Last synced: 8 months ago
JSON representation
:rocket: An automatic CRUD (create, read, update, delete) operation for virtual host using Nginx
- Host: GitHub
- URL: https://github.com/wildan3105/ng-crud
- Owner: wildan3105
- Created: 2016-10-08T18:12:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-31T17:53:28.000Z (over 8 years ago)
- Last Synced: 2025-04-02T15:43:01.330Z (about 1 year ago)
- Topics: crud, nginx, virtual-hosts
- Language: Shell
- Homepage:
- Size: 16.6 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Nginx Virtual Host CRUD Operation
[](https://www.codacy.com/app/wildan3105/ng-crud?utm_source=github.com&utm_medium=referral&utm_content=wildan3105/ng-crud&utm_campaign=Badge_Grade)
Simple bash script to perform CRUD (Create, Read, Update, and Delete) virtual host using Nginx
## Installation
1. Download the codes via terminal on your server
`$ wget https://github.com/wildan3105/Nginx-Vhost-CRUD-Operation/archive/master.zip`
2. Unzip the codes
`$ unzip master.zip /path/to`
3. Change permission for all files
`$ chmod +x *.sh`
4. Start managing your Nginx virtual host and **be productive** !
5. **Optional** : If you wanna edit the script on your own, you can also change permission to 755 to enable editing
`$ chmod 755 *.sh`
## Usage

**Assumption(s)** : You have set your basic Nginx virtual host / server blocks. If you haven't set it yet, check to this link :
[How to set up nginx virtual host on Ubuntu 16.04](https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04)
Basic command line syntax :
`$ sudo ./create.sh [argument]`
## Examples
1. Create a new virtual host :
*Syntax* : `$ sudo ./create.sh [domain]`
**Example** : `$ sudo ./create.sh blog.wildan.us`
2. List all active virtual host(s):
*Syntax* : `$ ./read.sh`
**Example** : `$ ./read.sh`
3. Delete certain virtual host :
*Syntax* : `$ sudo ./delete.sh [domain]`
**Example** : `$ sudo ./delete.sh blog.wildan.us`
4. Update virtual host address :
*Syntax* : `$ sudo ./update.sh [old-domain] [new-domain]`
**Example** : `$ sudo ./update.sh blog.wildan.us notes.wildan.us`
## Further Development
- [x] Add usage.sh
- [x] Check if domain already exist
- [ ] Colored output text
## Contributor
- [Wildan S. Nahar](http://github.com/wildan3105)
- [Enrique Matías Sánchez](http://github.com/quique)
## License
MIT