If you are publishing a Modern PWA to a website in a Sub Directory with Scriptoria, you will need to specify the path in two places:
- Publishing > App Store > Publishing Properties - PUBLISH_CLOUD_REMOTE_PATH
- Publishing > Web App (PWA) > Sub Directory
We use rclone to upload to a web server using the WebDAV protocol. If the configuration points to the root of the web server, you might have a PUBLISH_CLOUD_REMOTE_PATH=eng/bible
. For the Modern PWA to build correctly, you would need the Sub Directory setting set to /eng/bible
(notice the leading forward slash.
Scriptoria will synchronize these two setting with appropriate values.
- If you have set PUBLISH_CLOUD_REMOTE_PATH and not set PWA Sub Directory, then Scriptoria will update PWA Sub Directory (with “/” + the value of PUBLISH_CLOUD_REMOTE_PATH).
- If you have set PWA Sub Directory and not set PUBLISH_CLOUD_REMOTE_PATH, then Scriptoria will update PUBLISH_CLOUD_REMOTE_PATH (with the value of PWA Sub Directory but the leading “/” removed).
If there is some different in these paths (like PUBLISH_CLOUD_REMOTE_PATH=www/eng/bible but the actual PWA Sub Directory is /eng/bible), then you still need to specify both values. There is no way for Scriptoria to know this.
Thanks,
Chris
Hi Chris,
So this is what we normally use for ScriptureEarth PWA publishing properties.
I don’t understand this part. “If there is some different in these paths (like PUBLISH_CLOUD_REMOTE_PATH=www/eng/bible but the actual PWA Sub Directory is /eng/bible), then you still need to specify both values. There is no way for Scriptoria to know this.”
How do I know what “actual” means? The actual path is, for example, https://ScriptureEarth.org/data/kyc/sab/kyc. I’m confused about what specifically I need to put here. Is this correct?

Hello @Bill_Dyck,
Yes, since PUBLISH_CLOUD_REMOTE_PATH is www/data/ISO/sab/ISO
but the actual sub directory of the domain is /data/ISO/sab/ISO
, then you need to specify both. When the Modern PWA is built, it needs to know the sub directory that it is published to.
Also, there will need to be a configuration of Apache so that routes within the web app will work correctly as links (or if you refresh the page).
See Hosting a Modern PWA in a sub directory of a web server.
For your situation, you might need something like:
<IfModule mod_rewrite.c>
RewriteEngine On
# Match and rewrite URLs like /data/ISO/sab/ISO/settings or /data/ISO/sab/ISON/text
RewriteCond %{REQUEST_URI} ^/data/(.*?)/sab/(.*?)/.*$
RewriteRule ^ /data/%1/sab/%2/ [L]
</IfModule>
Chris