Host PHP without breaking Hatchbox?
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?
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. 🔥
I have it serving Jekyll apps perfectly, but wasnt sure about PHP.
I wanted to check as DevOps isnt my thing generally! :-)
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 :-)
So looks like somehow Apache2 was running:
Aug 20 19:12:51 vultr.guest nginx: 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. 😅