2

I am actually running my Angular 4 project trought an Ubuntu server 16.04 LTS where I setup Node JS but I would like to change the config to make it run only with apache, is that posible? If yes how to do that?

Thanks in advance for your answears

1
  • 1
    If you are talking purely about your front-end part (no back-end API or such - hard to see setup)... Just install Apache - start services - copy your resource files to the www directory - and goto your localhost url. Commented May 19, 2017 at 13:07

1 Answer 1

3

To run an Angular app from a web server (e.g. Apache) you need first to build a runtime package (e.g. via AngulaCli ng build command) and then deploy the package to Apache.

The only html file which will be downloaded will be index.html

All the rest of the app (js, css, other assets) will be downloaded automatically from there by Angular (this is the Single Page App model)

Sign up to request clarification or add additional context in comments.

2 Comments

thank you very much for help :-) I'll do that but I already tried to install Angular CLI on my laptop and it doesn't work..do you know if it's posible on Xubuntu?
Look like its posible to do on linux github.com/angular/angular-cli/commit/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.