owj8sw
Last Updated: February 25, 2016
·
10.51K
· rstacruz
F8ec7f90daf8b1defb8e318d663c0f17

Host a static HTML/CSS site in Heroku

touch index.php

Yes, that's all it takes. It tells Heroku that the site is a PHP site and that it will be hosted using Apache.

And yes, you can still have an index.html file. The .html file takes precedence over the .php one.

Say Thanks
Respond

6 Responses
Add your response

1783
Cff733cf90823edd218a834980379c61

My god. This is just superb.

over 1 year ago ·
2070
3ae6de27bfeb80acbecc2587763750d9

Nice! Thank you

over 1 year ago ·
2738
9a8e442df4e4189758c66dfc2f705e17

I think this will work if you add any character to that file. Last time I tried it didn't let me create the site.

over 1 year ago ·
3961
Photo 548884

I never tried heroku, even though I heard of it. This makes a little more sense now, makes me want to go try it out for myself :)

over 1 year ago ·
3997
Ac5c8c4c9580e06cb7dfef8405cbce34

@rstacruz: Thank you. I use Heroku for a while, and always use Flask or Sinatra for tiny websites.

I would like to add a note, that you can use HTML on Heroku to send emails, or register users, through REST API's.

Examples:
1. Sendgrid - http://sendgrid.com/docs/API_Reference/Web_API/mail.html
2. MongoLab - https://support.mongolab.com/entries/20433053-rest-api-documentation

Disclaimer: I do not affiliate with any of these companies.

over 1 year ago ·
11275
2009 09 30 nicole 9271 normal

Sorry, noob here. Where do I put touch index.php? In my index.html file?

over 1 year ago ·
Awesome Job

E20ce6a2 ca1f 11e7 82be 7f617c8310c9
SENIOR DEVELOPER (m/w)
·
Berlin, Köln, Hamburg, München
·
Full Time