I had the same issue, page loaded fine when I opened directly via http://127.0.0.1:8000 but it looked messed up when I opened via proxy http://127.0.0.1:80 In my case this was an nginx issue as it could not load the .css and .js files in /assets.
- nginx had no permission to access files in /assets because nginx was running under user www-data while the /assets folder was owned by erpnext. You can:
- add www-data user to the erpnext group:
usermod -aG erpnext www-data - edit /etc/nginx/nginx.conf and change:
user www-datatouser erpnext
- /assets/erpnext and /assets/frappe are symlinks. With certain nginx configs it might ignore symlinks, this is fixed using:
- edit /etc/nginx/nginx.conf and add into the http { section:
disable_symlinks off; - remove both symlinks and use bind in /etc/fstab, for example:
/opt/erpnext/frappe-bench/apps/erpnext/erpnext/public /opt/erpnext/frappe-bench/sites/assets/erpnext none defaults,bind 0 0
Make sure to restart nginx after applying changes. Good luck.