NOTE: This allows me to use PHPStorm and access c:\vagrant\projects\demo 
php files in the IDE and run the vagrant server on localhost using ip 
address 198.162.100.100 (or anyone you select)

On Friday, May 15, 2015 at 8:15:31 AM UTC-4, Ken Colvin wrote:
>
> When you make the symbolic link are you setting the permission properly 
> and updating apache?
>
> My vagrant is setup as follows.  On windows in c:\vagrant\projects I do my 
> "vagrant up"
> NOTE: /vagrant/projects/demo is my directory on Windows
> NOTE: /var/www/html/demo.com is the symbolic link on linux box
> So you need to provision your box as follows:
>
> sudo ln -s /vagrant/projects/demo /var/www/html/demo.com
>
> Permission should be:
> lrwxrwxrwx 1 root root    52 May 12 18:59 demo.com -> 
> /vagrant/projects/demo
>
> If using apache2 then you need to define your website.  I am using Laravel 
> so I set my website document root to the /var/www/html/demo.com/public 
> directory
>
> You need to edit /etc/apache2/sites-available/000-default.conf
>
> <Directory /var/www/html/demo.com/public>
>    Options Indexes FollowSymLinks
>    AllowOverride All
> </Directory>
>
> and then restart apache 
> sudo /etc/init.d/apache2 restart
>
>
> On Friday, May 15, 2015 at 4:25:36 AM UTC-4, Armen Babakanian wrote:
>>
>>
>>
>> <http://stackoverflow.com/questions/30252268/using-host-tools-to-develop-on-a-vagrant-machine#>
>>  
>>   
>> I am using vagrant for developing my website and I would like to use 
>> local machine(host) tools such as sublime, VS Code, etc.. to build the 
>> website. 
>>
>> This is how I setup the virtual machine. All the website related folder 
>> are in the home directory, with group permission set to www-data ex:
>>
>> ~/_blog
>> ~/_main
>> ~/_django_app
>>
>> and in the /var/www/ folder, a symbolic link of those folder are places:
>>
>> /var/www/blog -> ~/_blog
>> /var/www/index -> ~/_main
>> /var/www/app -> ~/_django_app
>>
>> I cannot use the /vagrant/ folder because it doesn't have permissions so 
>> If I share it and make changes there I would have to manually go and copy 
>> stuff over to home directory. I placed a copy of all the folders in the 
>> /vagrant/ folder and configured a 3rd party tool like incron which 
>> listens for file changes and runs a command, which I setup to run rsync 
>> to copy over from /vagrant/ to home directory. But when I make the 
>> changes in the host, it doens't work.
>>
>> Is there an alternative way of doing this that works?
>>
>> Thanks, 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to