I'm having trouble setting up a subdomain to a directory on my droplet (digital ocean):
I have my domain primarydomain.com of my droplet...i create a directory /livezilla/
Example:
primarydomain.com/livezilla
I want add a external subdomain to this directory (livezilla):
chat.myotherdomain.com.br
I have in: /etc/nginx/sites-avaliable/primarydomain.com:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.php index.html index.htm;
server_name primarydomain.com;
location / {
try_files $uri $uri/ /index.php?q=$uri&args;
}
}
And
/etc/nginx/sites-avaliable/chat.myotherdomain.com.br
server {
listen 80;
listen [::]:80;
server_name chat.myotherdomain.com.br;
root /usr/share/nginx/html/livezilla/;
index index.php index.html index.htm;
}
(with a copy on /etc/nginx/sites-enabled)
The chat.myotherdomain.com.br have a A Record in dns pointing to my droplet..
chat.myotherdomain.com.br now redirects to myotherdomain.com.br but with ping shows my droplet ip. )):
What's wrong?
Host chat.myotherdomain.com.br not found: 3(NXDOMAIN)