I've spent all of today trying to configure a server block that will let me install Craft 2.62797 on a Digital Ocean droplet running Ubuntu 14.04 with NGINX and PHP 7.

After uploading the craft directory and a public directory with the index.php file, a visit to my site gets the

**Service Unavailable** Our site is temporarily unavailable. Please try again later.


At first I was using the server block recommended by Brad Bell in this post.

Unfortunately that setup uses for a socket, and none of the other sites on our droplet uses a TCP socket -- they all use this chunk for fastcgi

location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_index index.php; include fastcgi_params; }

So I tried dropping that in, no dice. Here's some of the debug info from the site's error log. I think this is where it all goes wrong:

2016/07/19 16:50:08 [debug] 4362#4362: *18 connect to unix:/var/run/php/php7.0-fpm.sock, fd:23 #20 2016/07/19 16:50:08 [debug] 4362#4362: *18 connected 2016/07/19 16:50:08 [debug] 4362#4362: *18 http run request: "/index.php?" 2016/07/19 16:50:08 [debug] 4362#4362: *18 http upstream check client, write event:1, "/index.php" 2016/07/19 16:50:08 [debug] 4362#4362: *18 http upstream recv(): -1 (11: Resource temporarily unavailable) 2016/07/19 16:50:08 [debug] 4362#4362: *18 http upstream request: "/index.php?" 2016/07/19 16:50:08 [debug] 4362#4362: *18 http upstream dummy handler 2016/07/19 16:50:08 [debug] 4362#4362: *18 post event 00007FB15402C770 2016/07/19 16:50:08 [debug] 4362#4362: *18 post event 00007FB15403E780 2016/07/19 16:50:08 [debug] 4362#4362: *18 delete posted event 00007FB15402C770 2016/07/19 16:50:08 [debug] 4362#4362: *18 http upstream request: "/index.php?" 2016/07/19 16:50:08 [debug] 4362#4362: *18 http fastcgi parser: 0 2016/07/19 16:50:08 [debug] 4362#4362: *18 http fastcgi header: "Status: 503 Service Unavailable"

(I edited it for brevity, don't think I clipped out anything relevant).

For what it's worth, I tried editing PHP's www.conf settings, to allow for listening on and port 9000, as per this post. I knew this would break all the other sites, but I wanted to see if I could get it working -- still got a bad gateway error. (Possible that I hadn't restarted PHP after that change, though.)

The bizarre thing about all this is that I have a working Craft CMS install on this same droplet. I tried duplicating its server block, which was auto-generated by Laravel Forge, but that netted me the same error message and didn't log anything to the error log.

Anyway, that's about all I know -- I'm sure I'm leaving something out, but I'm a bit frayed by the debugging process. Would be grateful for any advice.

  • 3
    Have you tried going to yoursite.com/admin? That "Service Unavailable" message on the front-end could mean many things. You won't know for certain until you ping the back-end. – Lindsey D Jul 19 '16 at 22:09
  • 1
    When you get the 503, are you getting a square box in the center with that message or the standard nginx-styled 503 message? Craft also throws up a 503 if MySQL goes down.... might be worth a restart. – RitterKnight Jul 19 '16 at 22:20

Okay, my next stackexchange question will be "Where is the dunce cap?" because I could use one. My problem was not actually a problem, and Lindsey D was exactly right: I was just going to mysite.com, not to mysite.com/admin.

And I see now that that was clearly stated in the install instructions, a tab that I was referring to over the course of the whole afternoon!

Thanks, Lindsey, my morning just opened up. And to the dev of posterity who finds his way to this question and answer: I know it hurts.

| improve this answer | |
  • Thanks. Our server started returning a 503 and I needed this tip to find out the cause, thank you! ;-) – Simon East Jul 17 '17 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.