Ask A Question

Notifications

You’re not receiving notifications from this thread.

Host PHP without breaking Hatchbox?

firecall999 asked in General

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!

Reply

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. πŸ”₯

Reply

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!

Reply

Enabled the language option for your account. πŸ‘

Reply

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! :-)

Reply

I hear you! It wasn't my thing either, but it is now I guess. 😜

Reply

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!

Reply

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. :-)

Reply

Maybe Apache was a dependency of something you installed? Definitely can't have it running or else they'll conflict. πŸ˜…

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,464+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.