Skip to content

Latest commit

 

History

History
55 lines (43 loc) · 1.33 KB

revprod-deployment-solution.md

File metadata and controls

55 lines (43 loc) · 1.33 KB

Once you reach the phase titled "Using nginx to make both components appear as a single website", you should create the /etc/nginx/sites-available/revprod file on your server and it should look something this:

server {
  listen 80;
  server_name revprod.jde.archidep.ch;
  root /home/jde/revprod-landing-page/public;

  # Proxy requests for dynamic content to another server/application.
  location / {
    proxy_pass http://localhost:4201;
  }

  location /comments {
    proxy_pass http://localhost:4200;
  }

  location /share {
    proxy_pass http://localhost:4200;
  }
}

💎 Replace jde with your subdomain and jde with your Unix username.

👾 If you know your regular expressions, you can also combine the last two location blocks into one:

  location ~ \/(comments|share) {
    proxy_pass http://localhost:4200;
  }

You must enable that configuration by creating the appropriate link:

$> sudo ln -s /etc/nginx/sites-available/revprod /etc/nginx/sites-enabled/revprod

You must then ask nginx to reload its configuration:

$> sudo nginx -t
$> sudo nginx -s reload