Quick and dirty .htaccess for small personal sites

jess unrein on October 29, 2018

I host my personal site on a shared Dreamhost instance. I like it because it's relatively inexpensive, I have low traffic, and I'm not doing anyt... [Read Full]
markdown guide
 

If you're attracting a lot of traffic and/or having difficulties with high load on your server, you probably should move to a VPS where you have root access and use the main server configuration.

And you probably should move away from the Apache web server which does not scale well - and then you won't have a .htaccess file anyway.

 

Definitely, if you're working on a project where web server performance is very important, rather than just a dinky link dump like my personal site, Apache is probably something you should move on from. But I'm assuming that if you're working on that kind of scaling problem, you're not looking to fix small problems here and there with an .htaccess file.

 

What would you recommend moving away from Apache to?

PS. Really great article. Thanks for putting this together. I found it helpful and I am sure so many more will too.

NGINX (pronounced "engine x") has a more robust feature set for dynamic content and is more performant at scale.

There are definitely pros and cons to each solution, and the amount you "feel" the difference between them will largely depend on how complex your site is and what your scaling needs are.

Here's a good side by side comparison from the beginning of this year, if you're trying to decide which solution is right for you.

Okay, I definitely learned something today, because I had no clue how NGINX was pronounced, haha

 

This is the kind of stuff I like seeing! As a developer who doesn't get paid to play dev-ops, this stuff is enlightening and great :)

 

I really like how you provide a view of the surroundings of any command you use - what it is about, why you would use it (or not), the specifics of parameters....

 

The article is great, but I would like to deviate and try to fix the problem by not having it.

Your website looks pretty static, you can avoid having a server at all by using an object storage like Amazon S3 or Google Datastore. The free tier covers most cases, I use them with free SSL from CloudFlare.

If you really want to play with servers you can have a full VPS at the providers I mentioned, for free.

This brings me back some nice memories, I stopped using apache around 8yrs ago, while learning web dev and thinking that VPSs are black magic

 

Definitely makes sense to put static resources on Amazon S3 or Google Datastore, and I do use those resources for other toy projects and at work. However, I like having my site on shared hosting with an Apache server because I get to play around with things like .htaccess configuration, or run little experiments in a very low stakes environment. It's worth the ~$10 a month to have a space to mess around in. If I mess up, I'll learn something from it and more than likely no one will notice. :)

code of conduct - report abuse