Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Using Dropbox to sync local dev folders

Solved by Daniel Wrightson View solution

Started by Daniel Wrightson 5 years ago · 2 replies · 334 views
5 years ago

I generally use two computers and want to have a shared development folder so I can pick up working whether I'm at home or in the office. I had been using iCloud by adding a folder through the 'httpd-vhosts.conf' file - but iCloud has been really patchy and I've had instances of projects getting out of sync. So I looked at using Dropbox with a symlink from my Sites folder. Setting it up was really easy, and the websites popped up immediately - but as soon as I click on a link I get a 404 not found error. The files are all there, but I can't seem to get to them.

So I tried a different method and added the path to the dev folder on Dropbox as a virtual host - with exactly the same result. Can anybody through any light on this?

Method one:
Move the project folder to dropbox then make a symlink from the ~/Sites folder on my machine(s).

TXT
MiniDanno:Sites daniel$ ln -s ~/Dropbox/dev/invitationtotuscany invitationtotuscany

Method two
Still based on moving project folder into Dropbox, but then modifying httpd-vhost.conf

TXT
<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/Users/daniel/Dropbox/dev"
    <Directory "/Users/daniel/Dropbox/dev">
       AllowOverride None
       Options Indexes MultiViews FollowSymLinks
       Require all granted
    </Directory>
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "/opt/homebrew/var/log/httpd/dummy-host.example.com-error_log"
    CustomLog "/opt/homebrew/var/log/httpd/dummy-host.example.com-access_log" common
</VirtualHost>

Both give the same error - the homepage appears but all internal links give 404 not Found Error (The Apache one, not the Grav one)

5 years ago Solution

Have since found this article: https://www.paulingraham.com/dropbox-and-symlinks.html

I tried this approach too and changed my DocumentRoot in httpd.conf

TXT
DocumentRoot "/Users/daniel/Dropbox/Dev"
<Directory "/Users/daniel/Dropbox/Dev">

I get exactly the same results. And, BTW, I have been changing the text so I can be sure of which folder I'm pointing at...

still lost.

5 years ago

I re-installed grav and moved the content into the new installation folder and now it works. ?

No solution but at least I can work again now.

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 52 9 hours ago
Support · by Anna, 3 days ago
2 59 11 hours ago
Support · by Justin Young, 12 hours ago
1 30 12 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 56 5 days ago