Question

Dropbox based web site files + Ghost blog on subdomain

Hey everyone.

I’m looking to deploy my new site (avephoto.com) on a dropbox install along with a Ghost blog under the subdomain (blog.avephoto.com).

The dropbox functionality is convenience & workflow integration. At the moment I’m looking to have just the website content live in dropbox, and the blog content on server space. The website is a flat-file cms called Kirby and the blog would be Ghost based.

After doing some reading and searching, it seems I will need to run a virtual host. Do I need a different droplet for each part of thing (ie dropbox, ghost, Apache server)?

Any advice/input would be greatly appreciated before I begin to tackle this project. I’m new to how instances work, however I’m familiar with terminal and remote web server management.

Thanks Oscar


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Sorry to threadjack @okiave @asb, but I keep receiving 404s from my Dropbox + Nginx config.

Steps I’ve taken:

  1. Installed dropbox
  2. [Installed nginx] (https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-virtual-hosts-server-blocks-on-ubuntu-12-04-lts--3) and served hello world successfully
  3. Created a symlink from /var/www/example.com/public_html to ~Dropbox/path/to/site

I found this thread and went ahead and deleted the symlink to try your instructions. I added the ~Dropbox/path/to/site in the nginx config file. Still 404s.

Nice! Thank you. I was leaning more toward Nginx from what I had been reading. Seems like going with a one-click Ghost droplet will get me started on some of the steps.

Thanks for sharing the configs too. I didn’t realize this was as straight forward as a setting up a server.

Awesome O

You can definitely do this all on one droplet. Like you said, you just need to use virtual hosts. If you want to use our pre-installed Ghost one-click image as a base, it uses Nginx as its web server. To achieve what you want, your configuration would look something like:

server {
    listen 80;
    server_name blog.example.com ;

    client_max_body_size 10M;

    location / {
            proxy_pass http://localhost:2368/;
            proxy_set_header Host $host;
            proxy_buffering off;
    }
}

server {
        listen   80;
        server_name example.com;
        root /path/to/your/dropbox;

        index index.php index.html index.htm;

       location ~ .php {
           fastcgi_pass  127.0.0.1:9000;
           fastcgi_index index.php;
           include fastcgi_params;
           fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
           fastcgi_param PATH_INFO $fastcgi_script_name;
       } 

       location / {
           try_files $uri $uri/ /index.php?$query_string;
       }
}

As Ghost is a node.js app, it runs on its own port. You then use a proxy pass to redirect it to port 80. Kirby is PHP based, so you need to set php5-fpm.