Skip to main content

Posts

Showing posts from January, 2018

How to deploy angular2 with Apache server ?

How to deploy angular2 with Apache server  and angular cli?
ng build --prodIt will create dist folder in the applicationCopy the dist folder all files to /var/www/html/Create .htaccess file in the path of /var/www/html/Write this code   in .htaccess file<IfModule mod_rewrite.c>  RewriteEngine On RewriteBase / RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !-f  RewriteCond %{REQUEST_FILENAME} !-d  RewriteRule . /index.html [L]</IfModule>sudo service apache2 restart