0

Good day, I have a Laravel application on an Azure Virtual machine using Nginx in the ubuntu VM. I wanted to link it to the custom domain I purchased on name.com... Those are the steps that I did so you can track with me the issue because I ran out of options:

VM SIDE:

  • I created static IP on my VM.
  • I created my DNS name on my VM.
  • I opened ports: (80, and 443) on my VM.
  • I added my domain as server_name in the Nginx config of (sites-available and sites-enabled).
  • I opened ports: (80, 443) in Nginx.
  • I created a DNS Zone for my resource.

Name.com SIDE

  • I added : a record: host: @, answer: my public IP of VM
  • I added : a record: host: *, answer my public IP of VM
  • I added : CNAME record : host: www, answer: my DNS name
  • I added : TXT record : host : @, answer : MS=value

after searching I added the DNS nameservers I got from the DNS Zone of Azure.

I waited after changing every single step of the steps above and it didn't work.

What I get is:

Hmm. We’re having trouble finding that site.
We can’t connect to the server at bcwa.app.
If that address is correct, here are three other things you can try:
Try again later.
Check your network connection.
If you are connected but behind a firewall, check that Firefox has permission to access the Web.

What did I do wrong? What should I do next? To the point that I checked my domain on DNS Checker and it returned the public IP address correctly.

When I get online on my public IP and DNS name link they direct me to my application which is correct.

I'm new to Azure and setting up these configurations so I'll be glad if someone helped me as soon as possible.

Rose Riyadh
  • 101
  • 3
  • Where are you hosting your DNS zone? You seem to have added records to a zone at name.com, but also setup NS records to point to Azure DNS. You can't do both, so where is your zone? – Sam Cogan May 31 '22 at 17:18
  • @SamCogan that's correct I added them in both, should I return the dns in name.com? – Rose Riyadh Jun 01 '22 at 08:00
  • You need to pick one, either name.com is your dns provider or azure is, and out records there – Sam Cogan Jun 01 '22 at 08:00
  • @SamCogan I removed dns providing from name.com and only added nameservers to the domain that I got from dns zone in aure, is this correct? + I have a problem now.. It's reaching the backend side (laravel) but it's showing on the browser unable to connect + if I check it without https on curl it shows my html and checked the server side it's showing 405 in the nginx log, any idea of what should i do ? – Rose Riyadh Jun 01 '22 at 08:20
  • That’s down to your application, which is responding with that error code. Without knowing how your app works I have no idea. – Sam Cogan Jun 01 '22 at 08:21
  • @SamCogan I have searched a lot about this problem but I can't decide which permission is to add to my nginx to remove 405 and 403 errors – Rose Riyadh Jun 01 '22 at 08:24
  • @SamCogan thank you so much for your help, if you can add it as an answer so I can solve this problem and post my current issue – Rose Riyadh Jun 01 '22 at 08:24
  • 405 is a method not allowed error, so probably not permissions. But this is not an Azure issue any more as your DNS is working so I suggest you post another question with full details of errors, logs and config. – Sam Cogan Jun 01 '22 at 08:25
  • @SamCogan this is the problem's question https://serverfault.com/questions/1102058/ubuntu-server-not-allowing-domain-to-access-laravel-project-405 – Rose Riyadh Jun 01 '22 at 08:26

0 Answers0