Hi @avc,
i have found the issue. I have checked the nginx.conf file from a working erpnext and have seen there are sometimes $host parameter on the site where i get 404 error and on the other site where http port 80 is working there are the name of the erpnext site. I have changed $host parameter to the erpnext site name and now its working with HTTPS/SSL from external network and on local network with ip without editing the hostfile.
Do i need $host parameter? If i use the command “bench setup nginx” then my settings will be overrride.
Like this Where i get 404 error:
location ~ ^/protected/(.*) {
internal;
try_files /$host/$1 =404;
I have changed them to this:
location ~ ^/protected/(.*) {
internal;
try_files /erpnextsitename/$1 =404;
Regards
Kevin