Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jream/vhost-creator
CLI Apache/Nginx VirtualHost Generator
https://github.com/jream/vhost-creator
apache apache2 cli nginx python virtual-hosts virtualhost-generator
Last synced: 2 months ago
JSON representation
CLI Apache/Nginx VirtualHost Generator
- Host: GitHub
- URL: https://github.com/jream/vhost-creator
- Owner: JREAM
- Created: 2014-08-13T00:57:07.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-04T00:06:55.000Z (almost 8 years ago)
- Last Synced: 2023-08-18T00:28:18.681Z (over 1 year ago)
- Topics: apache, apache2, cli, nginx, python, virtual-hosts, virtualhost-generator
- Language: PHP
- Homepage: http://jream.com
- Size: 7.81 KB
- Stars: 10
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# VirtualHost Generator
Author [Jesse Boyer (JREAM)](http://jream.com)
This is a simple PHP CLI Script to generate an Apache VirtualHost on the fly. This is primarily useful for development environments.
This requires Apache 2 which uses the `Require all granted` Directory setting. The default directory setting is to `AllowOverride All` for your `.htaccess` files if you use them. Otherwise you can edit the outputted file.
## In Development
Im going to add nginx as well as apache.
This is in development, dont use it right now please.## Usage
In your Terminal run the following command and follow the instructions:$ php vhost.php
## Activate your Virtual Host
Once you save VirtualHost file using a site example lets call **unicorn**, you can activate it with:
$ sudo mv output/unicorn.conf /etc/apache2/sites-available
$ sudo a2ensite unicorn
$ sudo service apache2 reload## Access Your Site
Then you should be able to access your site:
http://127.0.0.1/unicorn/
## Misc
If you are using .htaccess for friendly URLS, turn mod_rewrite on:
$ sudo a2enmod rewrite
$ sudo service apache2 restart