jinema
January 31, 2018, 9:26am
1
Hi guys!
Im really confuse about how to set my domain name on my server…
right now im accessing my server via ip address plus the port i set…Now i want to access my server in the web by a domain name…
Ex:
IP Address:192.168.89.255:8080
Change to: mydomain.com
How can i set my servers domain name…
Thanks guys!
1 Like
Hi, you can use bench to setup domain
bench setup add-domain mydomain.com --site [site]
bench config dns_multitenant on
bench setup nginx
sudo service nginx restart
2 Likes
jinema
February 1, 2018, 1:12am
3
I have another question .
if i can setup my domain name on my server the port is included right… im very new at this , can you help figuring out?
Hi
I think you just follow these step. anything error pls post here.
jinema
February 1, 2018, 2:37am
5
got this error
bench setup add-domain qwerty.com --site site1.local
is it correct?
lukptr
February 1, 2018, 2:51am
6
can you list your site?
run
ls sites/
jinema
February 1, 2018, 3:05am
7
i got
apps.txt assets comon_site_config.json currentsite.txt erpnext.vm
lukptr
February 1, 2018, 6:13am
8
try this command but with --site erpnext.vm
jinema
February 1, 2018, 7:00am
9
it works … but i cant access my domain through my browser…
lukptr
February 1, 2018, 7:19am
10
you must edit your hosts file for that
Occasionally you may need to edit the hosts file on your machine. Your host file might have been edited maliciously in an attack, or as a prank. Alternatively, you may just want to control access to certain websites or control network traffic.
Est. Reading Time: 5 minutes
vgr2
April 2, 2018, 12:36am
11
Hey,
Having a similar issue.
After doing the steps outlined above I keep getting the Sorry We’ll Be Back Soon page on the IP address not the domain name that was set up.
Bear in mind that the domain name continues to change to the IP address. The only difference is that I can no longer log in.
What could be causing this and how to fix?
Thanks
lukptr
April 2, 2018, 3:17am
12
Once you turned on the dns multitenant mode, you wont be able to access it using IP address.
You may revert it using this:
bench config dns_multitenant off
bench setup nginx
sudo service nginx restart
vgr2
April 12, 2018, 10:44pm
13
I understand that however when the domain name is entered, it changes to the IP address.
Also changing dns_multitenant to off did not make a difference.
vgr2
April 12, 2018, 10:46pm
14
I have also tried editing my hosts file to no avail.
lukptr
April 13, 2018, 2:05am
15
May you share your nginx.conf on frappe-bench/config
?
vgr2
April 13, 2018, 8:44am
16
server_name
nhs
site1.local
catalyst.northgateglobal.com
;
root /home/catalyst/frappe-bench/sites;
location /assets {
try_files $uri =404;
}
location ~ ^/protected/(.*) {
internal;
try_files /$site_name_zokxlpa/$1 =404;
}
location /socket.io {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Frappe-Site-Name $site_name_zokxlpa;
proxy_set_header Origin $scheme://$http_host;
proxy_set_header Host $host;
proxy_pass http://frappe-bench-socketio-server;
}
location / {
try_files /$site_name_zokxlpa/public/$uri @webserver;
}
location @webserver {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frappe-Site-Name $site_name_zokxlpa;
proxy_set_header Host $host;
proxy_set_header X-Use-X-Accel-Redirect True;
proxy_read_timeout 120;
proxy_redirect off;
proxy_pass http://frappe-bench-frappe;
}
# error pages
error_page 502 /502.html;
location /502.html {
root /home/catalyst/.bench/bench/config/templates;
internal;
}
# optimizations
sendfile on;
keepalive_timeout 15;
client_max_body_size 50m;
client_body_buffer_size 16K;
client_header_buffer_size 1k;
# enable gzip compresion
# based on https://mattstauffer.co/blog/enabling-gzip-on-nginx-servers-including-laravel-forge
gzip on;
gzip_http_version 1.1;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/font-woff
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
text/plain
Thank you very much, this was the final step on creating a second ERPNEXT site on the same Google Cloud VM.
HI lukptr,
Me to facing same error after follow all above setup . Any advice ?
Add your server IP in your dns in A address