Angular Project Deployment on Live Server

Posted at: December 15, 2018 6:56 PM


Deploy your Angular application to a remote server.

Create a production build and copy the output directory to a web server.

  1. Start with the production build
  2. Copy everything within the output folder dist/ by default.
  3. Configure the server to redirect requests for missing files to index.html.

Server configuration

There is no single configuration that works for every server. The following sections describe configurations for some of the most popular servers.

Apache: add a rewrite rule to the .htaccess file as shown
Nginx: use try_files, as described in Front Controller Pattern Web Apps, modified to serve index.html
IIS: add a rewrite rule to web.config, similar to the one shown here
Firebase hosting: add a rewrite rule.

The base tag

In development, you typically start the server in the folder that holds index.html. That's the root folder and you'd add near the top of index.html because / is the root of the app.

But on the shared or production server, you might serve the app from a subfolder. For example, when the URL to load the app is something like, the subfolder is my/app/ and you should add to the server version of the index.html.

You can watch video on Angular Project Deployment on Live Server

Deployment Live Server Production Environment

Please click below YouTube button for subscribe my channel RSGiTECH for latest videos.

Angular Project Login - username: admin and password: admin

Angular 6/7 Tutorial in Hindi

Angular 7 is a JavaScript based framework for building web applications and apps in JavaScript, html, and TypeScript, which is a superset of JavaScript, used to create Single Page Applications.

RSGiTECH provides video tutorial for enough understanding of all the necessary components of Angular 6 and Angular 7.

RSGITECH will keep uploading videos of the latest features of Angular. Please subscribe my channel for latest videos.

Please leave comments


truecodex launched free android app. You can download and install truecodex app on your mobile and get notification of the latest post.

Video Tutorials on YouTube