if I want to deploy the Angular and java which is running on azure vm 8080 port through IIS server then what should be the approch?

Amol Harde 25 Reputation points
2023-10-09T08:54:51.9333333+00:00

if I want to deploy the Angular and java which is running on azure vm 8080 port through IIS server then what should be the approch?

Internet Information Services
{count} votes

1 answer

Sort by: Most helpful
  1. Yurong Dai-MSFT 2,811 Reputation points Microsoft Vendor
    2023-10-10T06:34:59.2366667+00:00

    Hi @Amol Harde,

    You can build and compile your Angular front-end application and deploy it in IIS.

    • Right-clicking Sites in IIS Manager and selecting Add Website.
    • Set the physical path to the directory where the Angular front-end files are located.
    • Configure the binding to specify the host name and port of the front end (for example, yourdomain.com on port 80).

    If your backend is a java based application, assuming it is a Spring boot application. It is not recommended that you host your Java web application directly in IIS, you can try to install docker or use tomcat to host the application. Assume that your Java backend is running on port 8080, you need to configure IIS to act as a reverse proxy to forward requests to your backend.

    Your Angular frontend and Java backend are on different domains or ports, CORS needs to be configured to allow cross-origin requests. This is usually done in the Java backend by specifying allowed origins and headers.

    You can test your setup by accessing the Angular frontend through an IIS server. Make sure it can successfully communicate with your Java backend through the reverse proxy.

    More details about how to use IIS reverse proxy, you could refer this article:

    Setup IIS with URL Rewrite as a reverse proxy for real world apps.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the email notification for this thread.

    Best regards,

    Yurong Dai

    0 comments No comments