Hi All,
I followed the instructions here in the documentation: https://docs.appeon.com/ps2022r3/Modifying_WebAPIURL_for_Nginx_Windows.html
I changed my apprun.json to point to my reverse proxy server and then rebuild solution and run the project in SnapDevelop. When checking the logs, it is not using the "web_api" change I made in apprun.json.
I did a project directory search for any other instances of "localhost:5099" to find if I need to change the URL elsewhere and the only other location its in is launchSettings.json.
Does anyone have any ideas on how to point to my reverse proxy within my local development environment?
When PowerServer Web APIs is directly run from the PowerBuilder IDE or SnapDevelop, it runs on the Kestrel server, and Kestrel will run at the URL specified in the launchSettings.json file. This URL also becomes the URL of Web APIs in the local development environment.
launchSettings.json is a config file for Kestrel (not for PowerServer or the cloud app). For more information about launchSettings.json, please refer to the following links:
https://docs.appeon.com/ps2022r3/Builtin_Kestrel.html
https://docs.appeon.com/ps2022r3/Kestrel_dev.html
From the launchSettings.json you provided, if Web APIs on Kestrel will run at https://localhost:5099/, you will need to configure nginx.conf to redirect requests to https://localhost:5099/ ("localhost" should be replaced with ip or domain, for example, https://172.16.100.35:5099, you can verify the URL first using https://172.16.100.35:5099/health-ui/.)
server {
listen 8080;
location / {
proxy_set_header Host $http_host;
proxy_pass https://172.16.100.35:5099;
}
}
After verifying this works in the local development environment, you can start Web APIs/Kestrel in the production environment by following: https://docs.appeon.com/ps2022r3/Kestrel_prod.html.
Regards
Tracy
my PC running local kestrel powerserver on localhost:5099 -> connects to reverse proxy server ip: 1.2.3.4. -> reverse proxy routes to another server with web_api running with ip: 5.6.2.3