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.
error.
At first I was using the server block recommended by Brad Bell in this post.
Unfortunately that setup uses 127.0.0.1:9000 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 127.0.0.1 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.
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.