Akshay Naik
Akshay Naik

Reputation: 565

How can i run an angular 6 application in wamp?

I have an angular 6 application which i want to install on Apache server, is it possible?? I don't want to install ngix. Is it possible to run the application on Apache server?

Upvotes: 2

Views: 232

Answers (2)

Punit Narang
Punit Narang

Reputation: 46

You can surely serve your application with Apache.

You need to configure your DocumentRoot as per your Angular Application Directory.

Additionally, you need to configure ReWriteEngine like below:

RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]

# If the requested resource doesn't exist, use index.html
RewriteRule ^ /index.html

Follow the link for more details: https://angular.io/guide/deployment

Thank you, Punit

Upvotes: 0

Alessandro Pierro
Alessandro Pierro

Reputation: 36

If you have to deploy your Angular app you can follow the instruction of this link :

'https://angular.io/guide/deployment'

Just build the project with 'ng build' and then copy the folder inside './dist/' with the name of your project inside the apache server www directory.

Upvotes: 1

Related Questions