I am working with NGINX and I have a couple issues here.
I have a domain and one subdomain
Server block for domain
listen 80;
server_name just4bettors.mobi www.just4bettors.mobi;
root /home/c0pt/capilleira/capilleiraclickandgamblemobile/www
Server block for subdomain
listen 80;
server_name www.desktop.just4bettors.mobi desktop.just4bettors.mobi;
root /home/c0pt/capilleira/capilleiraclickandgambleweb/dist;
for the domain everything works properly, you can access to the page and log and there is nothing wrong, but once you try to enter to the subdomain, you can see an error on the screen Server not found
when you enter http://www.desktop.just4bettors.mobi
, and when you enter http://desktop.just4bettors.mobi
you get GET http://desktop.just4bettors.mobi/ net::ERR_NAME_NOT_RESOLVED
Content-Security-Policy
for domain
add_header Content-Security-Policy
"default-src 'self';
script-src 'self' 'unsafe-inline' 'unsafe-eval';
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://themes.googleusercontent.com https://fonts.gstatic.com https://assets.zendesk.com;
object-src 'none';
connect-src http://just4bettors.mobi http://just4bettors.mobi:1337 http://www.just4bettors.mobi;";
now these are the Content-Security-Policy
for the sub-domain
add_header Content-Security-Policy
"default-src 'self';
script-src 'self' 'unsafe-inline' 'unsafe-eval' http://www.just4bettors.mobi http://www.desktop.just4bettors.mobi;
style-src 'self' 'unsafe-inline'
object-src 'none';
connect-src http://desktop.just4bettors.mobi http://www.desktop.just4bettors.mobi;";
so, what am I missing ? basically, the question would be: why I can not access to the subdomain ?
PD: all the DNS part is done already.
Best Answer
You said that: "all the DNS part is done already." In fact, all the DNS part is not done already. We can clearly see:
You just need to set up your DNS records correctly.