XMLHttpRequest CORS Problem

I just installed erpnext and the wizard is launched but i can’t complete the process due some errors:

GET net::ERR_ABORTED 404 (Not Found)
Access to XMLHttpRequest at ‘’ from origin ‘’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

My nginx block is like this:
location / {

                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "Upgrade";
                proxy_set_header X-Frappe-Site-Name;
                proxy_set_header Origin $scheme://$http_host;
                proxy_set_header Host $host;

                proxy_pass http://frappe-bench-socketio-server;

                add_header 'Access-Control-Allow-Origin' '*' always;
                add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
                add_header 'Access-Control-Allow-Credentials' 'true' always;
                add_header 'Access-Control-Allow-Headers' 'DNT, Authorization, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, Content-Type, Content-Length';
                add_header 'Access-Control-Expose-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modi$

What i’m missing ?

Thanks in advance

Well i manage to install ERPNext following this steps:
sudo python --production --user frappe
cd frappe-bench
bench drop-site site1.local
bench new-site
bench --site install-app erpnext
bench setup socketio
bench setup supervisor
bench setup nginx
sudo service nginx reload
sudo supervisorctl reload

Actually the problem was that port 9000 was already in use by docker
I found that with lsof -i tcp:9000