All threads / Host PHP without breaking Hatchbox?

Ask A Question

Notifications

You鈥檙e 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!

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. 馃敟

Enabled the language option for your account. 馃憤

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

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

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. 馃槄

Join the discussion

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

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

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

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2021 GoRails, LLC. All rights reserved.