Added the www. alias
Added a www.* alias to the host. If you create the host site.com, now it can be accessed through site.com and www.site.com
Shouldn't you also add a flag in case www is not necessary. Example, in the case that you make a subdomain, would you want www.subdomain.domain.com. Probably not.
Personally, the script is not intendend to be used on production, so www is not necessary, already reject PR related with prepend www, probably the use of both could be, thoughs?
Personally I used your script on a production server for non-critic applications (my personal sites) and I think that for this case it fits the need. I agree that I wouldn't use it in a more complex environment. I think that adding the www. would help people who are searching for a rapid way to create ready-to-go virtual hosts on a non critical production environment. I agree too with the other comment that a flag to choose if enable the alias is appropriate, so if you think that the feature can be accepted, I'll do another PR with a specific flag to enable the alias. Let me know
I think both option would be great, to use domain with/without www prefix
Hi, I added an optional parameter for adding the virtual alias (not only www, you can choose which alias you want to use) and updated the readme. Moreover, I fixed an issue with nginx directory configuration. I didn't made another pull request for that since my feature was dependent on that fix. Let me know if it is ok now.
Please see my update on your previous comment here