Hello All
I am new to this software and nginx.
I installed the VM on my server and am able to connect to the site. Now i wish to add HTTPS.
My port 80 and 443 is blocked so first i used these commands to redirect.
Port based multitenancy
You can create a new site and make run it on a different port (while the first one runs on port 80).
Switch off DNS based multitenancy (once)
bench config dns_multitenant off
Create a new site
bench new-site site2name
Set port
bench set-nginx-port site2name 82
Re generate nginx config
bench setup nginx
Reload nginx
sudo service nginx reload
I made a new site (test.com). Then i installed lets encrypt ```
sudo apt install python-certbot-nginx
and did the manual dns challange and got my keys in etc/letsencrypt/live/test.com
Then i follow this guide :
Configure the certificates for your site(s)
Go to your erpnext sites site_config.json
$ cd frappe-bench/sites/{{ site_name }}
Add the following two lines to your site_config.json
"ssl_certificate": "/etc/letsencrypt/live/example.com/fullchain.pem",
"ssl_certificate_key": "/etc/letsencrypt/live/example.com/privkey.pem"
Regenerate the nginx configuration
$ bench setup nginx
Restart the nginx server
$ sudo service nginx restart
Everything is working till i run the command bench setup nginx then i get this message:
nginx.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y
WARNING: The site config for the site test.com is broken. If you want this command to fail, instead of just showing a warning, You may add the 'strict_nginx' flag to common_site_config.json and set it to 1
Port configuration list:
Site site1.local assigned port: 80
Anyone have any ideas?
Thanks in advance