Reputation: 1561
What I have done till now.
1- I have used below vagrant box https://scotch.io/bar-talk/introducing-scotch-box-a-vagrant-lamp-stack-that-just-works
2- After that I have created a virtual subdomain/domain on the Vagrrantmachine that are pointing to different folders on code directory
-- say abc.def.com pointing to var/www/public/pmtool -- and aaa.def.com pointing to var/www/public/pmtool2
and these domains are enabled on virtual machine and running fine.
that is to say http://abc.def.com points to proper directory.
3- Now when I issue vagrant share command it provides me a url that is pointing to /var/www/public directory,
What I need to know that how I could get the urls aliases for these folders (domains/subdomains). i.e.an url alias to pointing to these directories.
Upvotes: 0
Views: 506
Reputation: 497
Another way to look at is that vagrant gives a url in the "vagrantshare.com" domain and what you want is to use "abc.def.com" and "aaa.def.com" still. The DNS that would make this possible would be for you to own the "def.com" domain and add CName records to it for both "abc.def.com" and "aaa.def.com", both pointing to the "vagrantshare.com" hostname generated for you by vagrant.
Upvotes: 0
Reputation: 1331
You shouldn't feel too bad as other people have had this issue as well. The most relevant is this SO question, with the currently most upvoted answer being:
Change your WhateverItIs.conf file followingly by adding ServerAlias:
ServerName WhateverItIs.com ServerAlias *.vagrantshare.com
and now you are good to go.
Upvotes: 1