0

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Abhishek
  • 1,543
  • 3
  • 13
  • 29

2 Answers2

1

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.

Community
  • 1
  • 1
Brian Brownton
  • 1,313
  • 14
  • 31
0

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.

Aslan Brooke
  • 497
  • 2
  • 8
  • thanks fr yr answer, but in case if i don't have these domains, they are locally created at virtual box, means to say I have not purchased them from any provider, just created it locally so in that case what needs to be done ? – Abhishek Mar 20 '16 at 16:57