Try ERPNext Buy Support Partners Foundation Foundation Members

Unable to switch from development to production mode

Hello team ,
I am using development mode and i created my apps , now i want to move to production but i am
not able to move from development to production, please find the error log

dbrestore is a user
#command:- sudo bench setup production --yes dbrestore
#error log
Port configuration list:

Site db.local assigned port: 9000
INFO:bench.utils:sudo /usr/bin/supervisorctl reread
No config updates to processes
INFO:bench.utils:sudo /usr/bin/supervisorctl update
nginx: [emerg] open() “/etc/nginx/conf.d/frappe-bench.conf” failed (2: No such file or directory) in /etc/nginx/nginx.conf:75
nginx: configuration file /etc/nginx/nginx.conf test failed
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/dbrestore/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/dbrestore/bench-repo/bench/commands/setup.py”, line 67, in setup_production
setup_production(user=user, yes=yes)
File “/home/dbrestore/bench-repo/bench/config/production_setup.py”, line 41, in setup_production
reload_nginx()
File “/home/dbrestore/bench-repo/bench/config/production_setup.py”, line 141, in reload_nginx
subprocess.check_output([‘sudo’, find_executable(‘nginx’), ‘-t’])
File “/usr/lib/python2.7/subprocess.py”, line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command ‘[‘sudo’, ‘/usr/sbin/nginx’, ‘-t’]’ returned non-zero exit status 1

#error log2
frappe-bench$ sudo nginx -t
nginx: [emerg] open() “/etc/nginx/conf.d/frappe-bench.conf” failed (2: No such file or directory) in /etc/nginx/nginx.conf:75
nginx: configuration file /etc/nginx/nginx.conf test failed