Elie
June 21, 2018, 11:53am
1
Hi i created a new site and configure nginx on port 82 i want to open the first company with localhost:8000 and the second on localhost:82 i did those steps but it didn’t work any help?
1-Create a new site
bench new-site company.local
2-Set port
bench set-nginx-port company.local 82
3-Re generate nginx config
bench setup nginx
4-Reload nginx
sudo service nginx reload
3 Likes
please check inside /etc/nginx/conf.d and check if the nginx config file has been updated or not.
Elie
June 21, 2018, 3:26pm
3
hi @koshish ,
Inside /etc/nginx/conf.d i have nothing
What should i do?
adnan
June 21, 2018, 6:47pm
4
sudo cp /home/frappe/frappe-bench/config/nginx.conf /etc/nginx/sites-available/default
sudo cp /home/frappe/frappe-bench/config/supervisor.conf /etc/supervisor/conf.d/supervisor.conf
if your user is frappe.
and after that
bench setup nginx
sudo service nginx reload
sudo service nginx restart
Elie
June 22, 2018, 10:34am
5
hi @adnan
i did the first command
sudo cp /home/frappe/frappe-bench/config/nginx.conf /etc/nginx/sites-available/default
but the second one isn’t available in this location no supervisor.conf file so didn’t do it
and i did the rest of the steps but still when i type in the URL: localhost:82 it doesn’t open.
Another thing is in this path /etc/nginx/conf.d there are no nginx config file.
any other fixes?
adnan
June 22, 2018, 11:39am
6
Make sure Supervisor and Nginx are installed.
bench set-nginx-port site2name port
sudo cp /home/frappe/frappe-bench/config/nginx.conf /etc/nginx/sites-available/default
sudo cp /home/frappe/frappe-bench/config/supervisor.conf /etc/supervisor/conf.d/supervisor.conf
if your user is frappe.
and after that
bench setup nginx
sudo service nginx reload
sudo service nginx restart
and the try the above commands again. hope this will help. i was stuck on this same issue 3 days ago… took 3 hours to make it working.
best of luck.
1 Like
Elie
June 22, 2018, 3:55pm
7
hi @adnan i have the developer mode i don’t have a supervisor.conf
what should i do?
open terminal run 1st site as normal : bench start
open another terminal and run 2nd site : bench --site {sitename} serve --port 8005
11 Likes
Elie
June 22, 2018, 10:28pm
9
Thanks, for this clarification.
Thanks dear for quick response.
DNS based multitenancy is already done.
Is there any command to check if Multitenancy is on or off?
Please check my /etc/hosts
right now site1.example.com accisible at example.com