I have a https://live.erpnext.example.com. It is working good. My react app is connecting to it and working great.
I want to clone the live site to https://test.erpnext.example.com.
Unfortunately one of the api call, the create event call, is just not working. If I point my react app to the local ip address and do the api call it works. If I call the https://test.erpnext.example.com it does not work.
Live site is working great.
This is what I did.
- stop live site
- copy the vm of the live site to my home server
- start live site
- start clone live site at home server
- in the clone, bench remove site
- in the clone, bench create new site called https://test.erpnext.example.com
- in the clone, bench restore with database backup of live site
- setup nginx proxy to test site
Test site is working at home and in the public ip. I can log into erpnext all good.
Setup react app to point to the https://test.erpnext.example.com. All api calls are working except creating of events.
Using firefox Web Developer Tools, I go to network tab and it is calling https://test.erpnext.example.com and the status is 200. So react app is calling the right place.
Even when I try to create the event manually in erpnext, it fails too.
Just do not understand why it does not create events in erpnext.
What am I doing wrong? Or what is the correct way to create a testing site?
Here is my nginx proxy config to erpnext
proxy_pass http://10.10.10.10;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_send_timeout 300;
proxy_read_timeout 300;
send_timeout 300;