Host PHP without breaking Hatchbox?
Hi,
I have a couple of small PHP scripts I want to host on my Hatchbox / Vultr / Ubuntu server.
Whats the best way to do that without screwing up Hatchbox?
Thanks!
You can add your own sites in /etc/nginx/sites-enabled/mysite. Just don't use a name that matches an app name in Hatchbox.
Hatchbox doesn't really make any adjustments to the NGINX config other than enabling Passenger, so you're free to add PHP, etc. π
I actually have a private beta in Hatchbox that lets you choose a language when you deploy an app. You could deploy your PHP scripts from there (I've tested Laravel and Wordpress I believe). I'll have to add enable that on your account and you can then select the language when you create a new app.
We're working almost finished with the first version of Hatchbox v2, which switches to ASDF so each app can specify their language (and versions) so in the future you'll be able to deploy PHP apps. π₯
Hey Chris, any chance you can enable that on my account as well? I have two old client wordpress sites on an old server that I'd dearly love to shut down and move away from. Hoping to keep everything on one server going forward!
Thats Great!
Thanks Chris!
I have it serving Jekyll apps perfectly, but wasnt sure about PHP.
I wanted to check as DevOps isnt my thing generally! :-)
Hi Chris,
I think something went haywire :-)
I'm now seeing the "Apache2 Ubuntu Default Page".
Maybe enabling PHP also installed Apache! :-)
I restored from a VULTR backup from yesterday, but still borked.
I'll see if I can figure it out :-)
Thanks!
So looks like somehow Apache2 was running:
Aug 20 19:12:51 vultr.guest nginx[697]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Running 'sudo /etc/init.d/apache2 stop' and then 'sudo service nginx start' and we are back up!
I'll stop Apache from starting. :-)
Maybe Apache was a dependency of something you installed? Definitely can't have it running or else they'll conflict. π