After 3CX update process, you should run a special script, that set up a new configuration file for nginx.
Script is available here
Common usage method:
wget https://download.creomate.com/update.sh -P /var/www/webapi/ wget https://download.creomate.com/install_update_cron.sh sudo bash /var/www/webapi/update.sh sudo bash install_update_cron.sh
This scripts will update nginx configuration, and set up a CRON job for a regular configuration check and update.
-----------------
Or you may do it manually
After each 3CX update, you need to edit the nginx.conf file.
nano /var/lib/3cxpbx/Bin/nginx/conf/nginx.conf
After:
client_max_body_size 300m;
root "C:/ProgramData/3CX/Data/Http/wwwroot";
Add
location ~ ^/webapi/?(.*) { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1:8081/webapi/$1$is_args$args; proxy_buffering off; }
Restart nginx Service (3CX Phone System Nginx Webserver)
systemctl restart nginx
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article