vincentmorneau / apex-pwa

A complete guide for turning an APEX application into a Progressive Web App
MIT License
82 stars 26 forks source link

Where to put manifest.json and sw.js with Tomcat #11

Closed Jantjevlith closed 5 years ago

Jantjevlith commented 5 years ago

Not really an expert here so be easy on me.

screen shot 2019-01-04 at 14 38 01

I'm following your guide but i'm not able to find the manifest.json.

We are using Tomcat (Nginx as reverse proxy, oracle linux 7.5) , and tried multiple locations such as:

/var/lib/tomcat/webapps /var/lib/tomcat/webapps/ords

furthermore for now we are using http instead of https (may that be the issue?).

I have tried different ways but I 'm out of options, if u could point me in a new (correct) direction it would be much appreciated.

(Also tried a it on a different server with ORDS standalone, same error (also HTTP....))

Tnx in advance,

Jan

vincentmorneau commented 5 years ago

HTTPS will be required for your service worker.

For your root location, do you see your APEX image prefix, like /var/lib/tomcat/webapps/i/ or something similar?

Jantjevlith commented 5 years ago

yes it exists

screen shot 2019-01-04 at 19 48 45

and i also tried putting it there but didn't succeed

vincentmorneau commented 5 years ago

Sorry I was confused. You need to find the docroot directory in the config file of your reverse proxy.

For nginx I'm not too familiar, but it should be similar to DocRoot=/etc/httpd/docs. For apache the config files are httpd.conf or ssl.conf on Linux.

jellescheurwater commented 5 years ago

Been working with Jan on this issue and turned out to be a SELinux policy issue in combination with specifying a location for the manifest in the Nginx configuration for our APEX installation.

  1. Specifying a location for the manifest in Nginx, either by using the root parameter or a location for manifest.json, turned the 404 error for the manifest.json into a 403 error.
  2. Creating a custom policy to allow Nginx to read from the Tomcat socket solved the 403 error.

By doing the first, we introduced some other errors, but at least we got the manifest.json displayed as per your guide.

Jantjevlith commented 5 years ago

This ticket can be closed. Tnx for your input