Skip to content

Instantly share code, notes, and snippets.

View AmrHalim's full-sized avatar

Amr Halim AmrHalim

View GitHub Profile
@AmrHalim
AmrHalim / deploy-react-apps-with-apache2-how-and-why.md
Last active March 31, 2022 14:09
React Deployment with Apache2, how and why?

In this article we will together go through the process of deploying front end applications to production environments ( specifically React applications ).

How does the web work?

Before we dig into the actual steps needed to deploy React applications, let’s first think about how the web works in general.

When you visit a URL like this: http://my-domain.com/user/profile, you’re basically sending a request searching the web to find if there’s an A record for this domain linked to any IP address, aka server, and if it finds one, it sends this request to that server. But for this server to be able to handle that request, there needs to be some kind of software, from now on let’s call it a web server to handle this request and get some response to send it back to you!

There are many web servers out there that you can use. For this article, we’ll focus on the configurations for [Apache2](h