Can't get subdomain to work nginx, debian 9

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,575
Reaction score
4,143
Credits
40,707
It means the webserver is working correctly as I said before but that something locally isn't working for you. Try creating a dns entry that looks like the one you already have but then for support, so it looks like this.
Code:
support.webshooter.se.    3600    IN    A    194.54.164.156
 


OP
R

ralphot

Member
Joined
Jun 13, 2021
Messages
35
Reaction score
13
Credits
253
It means the webserver is working correctly as I said before but that something locally isn't working for you. Try creating a dns entry that looks like the one you already have but then for support, so it looks like this.
Code:
support.webshooter.se.    3600    IN    A    194.54.164.156
Ok, I will try that. Thanks a lot..
 
OP
R

ralphot

Member
Joined
Jun 13, 2021
Messages
35
Reaction score
13
Credits
253
Ok, I will try that. Thanks a lot..
the hosts file in the server looks like this: (with the addition you recommended)
127.0.1.1 ws02 ws02
127.0.0.1 localhost
support.webshooter.se. 3600 IN A 194.54.164.156
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

So I don't know what else to do.
The hostname is ws02
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,575
Reaction score
4,143
Credits
40,707
You don't add it to the webserver's host file but you need to add it to the server(s) hosting the dns for webshooter.se so that you can request it through dns.
Code:
;; ANSWER SECTION:
webshooter.se.        3600    IN    SOA    ns1.namesystem.se. registry.glesys.se. 12 10800 2700 1814400 10800
So these servers are hosting the domain webshooter.se.
Code:
;; AUTHORITY SECTION:
webshooter.se.        23326    IN    NS    ns1.namesystem.se.
webshooter.se.        23326    IN    NS    ns2.namesystem.se.
webshooter.se.        23326    IN    NS    ns3.namesystem.se.
Code:
ns1.namesystem.se has address 195.238.76.18
ns1.namesystem.se has IPv6 address 2a02:750:aaaa::1

ns2.namesystem.se has address 195.238.77.18
ns2.namesystem.se has IPv6 address 2a02:750:aaaa::2

s3.namesystem.se has address 195.20.206.18
ns3.namesystem.se has IPv6 address 2a02:750:aaaa::3
If you have a hostprovider hosting the dns for you then you should be able to login to an interface to add dns records, that's where you add support.webshooter.se with the ip adress.
 
OP
R

ralphot

Member
Joined
Jun 13, 2021
Messages
35
Reaction score
13
Credits
253
You don't add it to the webserver's host file but you need to add it to the server(s) hosting the dns for webshooter.se so that you can request it through dns.
Code:
;; ANSWER SECTION:
webshooter.se.        3600    IN    SOA    ns1.namesystem.se. registry.glesys.se. 12 10800 2700 1814400 10800
So these servers are hosting the domain webshooter.se.
Code:
;; AUTHORITY SECTION:
webshooter.se.        23326    IN    NS    ns1.namesystem.se.
webshooter.se.        23326    IN    NS    ns2.namesystem.se.
webshooter.se.        23326    IN    NS    ns3.namesystem.se.
Code:
ns1.namesystem.se has address 195.238.76.18
ns1.namesystem.se has IPv6 address 2a02:750:aaaa::1

ns2.namesystem.se has address 195.238.77.18
ns2.namesystem.se has IPv6 address 2a02:750:aaaa::2

s3.namesystem.se has address 195.20.206.18
ns3.namesystem.se has IPv6 address 2a02:750:aaaa::3
Shall I put all this into the /etc/hosts file in the server to get it to work?
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,575
Reaction score
4,143
Credits
40,707
Shall I put all this into the /etc/hosts file in the server to get it to work?
1. We have concluded that the subdomain works because when I added it to my hosts file I get the page that you expect.
2. The location where you do a request from to support.webshooter.se is that from your laptop or are you logged in directly into the webserver and have a browser open there?
3. How did you get it to work for the working domain webshooter.se, I find it strange that you have it working for that one but can't get it to work for the new subdomain, what's the difference as in how they are setup?

I hope you are doing this for your personal learning experience and not for work?
 
Last edited:
OP
R

ralphot

Member
Joined
Jun 13, 2021
Messages
35
Reaction score
13
Credits
253
1. We have concluded that the subdomain works because when I added it to my hosts file I get the page that you expect.
2. The location where you do a request from to support.webshooter.se is that from your laptop or are you logged in directly into the webserver and have a browser open there?
3. How did you get it to work for the working domain webshooter.se, I find it strange that you have it working for that one but can't get it to work for the new subdomain, what's the difference as in how they are setup?

I hope you are doing this for your personal learning experience and not for a company?
1. OK.
2 I am using safari in my macbook and in hosts in that if I put 194.54.164.156 support.webshooter.se I can reach the support page but not without it. I have only an ssh connection to the server.
3 I have not set up that originally, there is another guy have done that, hard to get in touch with so difficult to ask him... :)

All this is, the webshooter is a pistol competition system written in laravel and all is volontary work, not for making profit. And yes, for my personal learning!
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,575
Reaction score
4,143
Credits
40,707
1. OK.
2 I am using safari in my macbook and in hosts in that if I put 194.54.164.156 support.webshooter.se I can reach the support page but not without it. I have only an ssh connection to the server.
3 I have not set up that originally, there is another guy have done that, hard to get in touch with so difficult to ask him... :)

All this is, the webshooter is a pistol competition system written in laravel and all is volontary work, not for making profit. And yes, for my personal learning!
2. You have to add support.webshooter.se to your dns server settings, these are the dns servers for webshooter.se.
Code:
webshooter.se.        23326    IN    NS    ns1.namesystem.se.
webshooter.se.        23326    IN    NS    ns2.namesystem.se.
webshooter.se.        23326    IN    NS    ns3.namesystem.se.
I suspect that you host your domain on the dns server of the hosting provider where you bought it, usually you have a webinterface were you can add/remove/modify dns records. Looking at the information of the ip adress of the first dns server it hosted by the provider "GleSYS".
So I would expect that you have some sort of login account that you can login an account there to manage your dns records. That will also be where webshooter.se is defined, so this record.
Code:
webshooter.se.        3600    IN    A    185.157.223.140
Glad that it's just for personal learning and voluntary working, that's a great wait to gain experience! :)
 
OP
R

ralphot

Member
Joined
Jun 13, 2021
Messages
35
Reaction score
13
Credits
253
2. You have to add support.webshooter.se to your dns server settings, these are the dns servers for webshooter.se.
Code:
webshooter.se.        23326    IN    NS    ns1.namesystem.se.
webshooter.se.        23326    IN    NS    ns2.namesystem.se.
webshooter.se.        23326    IN    NS    ns3.namesystem.se.
I suspect that you host your domain on the dns server of the hosting provider where you bought it, usually you have a webinterface were you can add/remove/modify dns records. Looking at the information of the ip adress of the first dns server it hosted by the provider "GleSYS".
So I would expect that you have some sort of login account that you can login an account there to manage your dns records. That will also be where webshooter.se is defined, so this record.
Code:
webshooter.se.        3600    IN    A    185.157.223.140
Glad that it's just for personal learning and voluntary working, that's a great wait to gain experience! :)
Yes, I will try to get in touch with Glesys and update the dns records.
Thanks again my friend.
 
OP
R

ralphot

Member
Joined
Jun 13, 2021
Messages
35
Reaction score
13
Credits
253
Skärmavbild 2021-06-16 kl. 10.48.23.png

Have now added the A-record for support, works perfect!
Here is the page: http://support.webshooter.se/
Again, many thanks for your help and support :cool:
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,575
Reaction score
4,143
Credits
40,707
Yest hat works now without me adding it to my hosts file because I get an answer when doing a dns request for support.webshooter.se.
Code:
;; ANSWER SECTION:
support.webshooter.se.    3580    IN    A    194.54.164.156
Glad to have helped out and glad that you got it working and learned something! :)
 
OP
R

ralphot

Member
Joined
Jun 13, 2021
Messages
35
Reaction score
13
Credits
253
Yest hat works now without me adding it to my hosts file because I get an answer when doing a dns request for support.webshooter.se.
Code:
;; ANSWER SECTION:
support.webshooter.se.    3580    IN    A    194.54.164.156
Glad to have helped out and glad that you got it working and learned something! :)
Right, learned a lot, or actually, helped me to remember. Was many, many years ago I handled this kind of problem. You know, I'm 78 years of age. ;) But still going strong. Have been working among a few others on this Laravel-based system for pistol competition since last november.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,575
Reaction score
4,143
Credits
40,707
Right, learned a lot, or actually, helped me to remember. Was many, many years ago I handled this kind of problem. You know, I'm 78 years of age. ;) But still going strong. Have been working among a few others on this Laravel-based system for pistol competition since last november.
Quite impressive for someone your age! :) If you like you can post a topic in the introduction section so you can meet some of the other members.
 
OP
R

ralphot

Member
Joined
Jun 13, 2021
Messages
35
Reaction score
13
Credits
253
I wonder, do you know what could be the problem when I use swedish characters in nano everything goes crazy. In the picture, have two identical lines, I place my marker over the first ö and types an a.
All the other ö there disappears replaced by a ? and the cursor goes away to the right many places.
What can be the problem. Difficult to edit swedish text as you can understand.
Also this: "skapa ta?^hvlingar ma?^jste" --- is really ---"skapa tävlingar måste"
 

Attachments

  • Skärmavbild 2021-06-17 kl. 14.22.17.png
    Skärmavbild 2021-06-17 kl. 14.22.17.png
    25.2 KB · Views: 234
Last edited:

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,575
Reaction score
4,143
Credits
40,707
I wonder, do you know what could be the problem when I use swedish characters in nano everything goes crazy. In the picture, have two identical lines, I place my marker over the first ö and types an a.
All the other ö there disappears replaced by a ? and the cursor goes away to the right many places.
What can be the problem. Difficult to edit swedish text as you understand.
I don't use nano so wouldn't know and I don't use foreign characters. Could you create a new topic for that problem/question, so that someone else who has experience with foreign characters will see it and can help you out with that.
 
OP
R

ralphot

Member
Joined
Jun 13, 2021
Messages
35
Reaction score
13
Credits
253
I don't use nano so wouldn't know and I don't use foreign characters. Could you create a new topic for that problem/question, so that someone else who has experience with foreign characters will see it and can help you out with that.
All right. Will do that. Thank you.
 
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Top