Vhost Manager v1.1

in #utopian-io7 years ago (edited)

New Features

In a previous post, i introduced vhost-manager 1.0, a command line tool that helps to create and manage sites on your machine.

In this release,

  • You can now specify a directory

Previously, you could only create a new site in the current directory you are working it. This makes sense in many cases. Sometime other time, you want to create a site without creating a directory yet. In this release, you can specify a directory you want to use as your domain root. if the directory does not exist, it will be created and necessary permissions will be set. This saves you a lot of headache.

Just run

$ ./vhost new:site

It asks you for

  1. Sitename
  2. Root directory. If left empty, the current working directory will be used.
  3. Public directory

For permission reasons, make sure you run the command with sudo

  • You can now delete a site

What happens if you make a mistake or you want to completely erase a virtual site from your machine? just run

./vhost delete:site

You will get a list of all available sites of which you are to select one from. After selecting, you will be prompted to confirm that you are sure. If you agree, then the manager will proceed to delete your site.
Again, you have to run this command with sudo

  • Output now printed nicely.

I also created a base command class CommandStructure.php that contains basic common commands which other classes extend.

Many thanks to symfony/process project.

Github commits

https://github.com/therealSMAT/vhost-manager/commit/a2c30b75f0137a719581922f02429ed24bf02135

https://github.com/therealSMAT/vhost-manager/commit/2ed0f9d904e74ced90913a8f92f1fb41d7d04b21

https://github.com/therealSMAT/vhost-manager/commit/28996ea7f6cb440bba7c07b0ea0c2e3ae9b96559

https://github.com/therealSMAT/vhost-manager/commit/70e7ab23f2a33b1c7b72e7ea468d9c37890941ab

https://github.com/therealSMAT/vhost-manager/commit/bb5f73c05faeaf06cbb174847e3b80c0b5cb4bf0



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Some really useful tool here, loving it already

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @therealsmat I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x