Author Topic: CwntOS web panel - DNS/NameServer configuration  (Read 7876 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
CwntOS web panel - DNS/NameServer configuration
« on: February 03, 2018, 03:09:47 AM »
Hi
I have installed CentOS web panel in CentOS 7 and configured nameserver in the panel that points to ns1.linode.com and ns2.linode.com. I have also created subdomain support.demohost.org with A record in Linode DNS manager.

Being said that, i have installed zammad in CentOS 7 that runs in the port 3000/6042 and there is a default nginx(Port 80) reverse proxy configuration file so that i can access it in the browser using http://support.demohost.org. I get correct result using curl support.demohost.org in the server's terminal. But when i try to access it in the browser outside server, i am redirected to the default site i.e demohost.org

I have not created any subdomain using CentOS web panel.
Any insights will be highly appreciated.
Regards

https://imagebin.ca/v/3qO8rPaB34wb
« Last Edit: February 03, 2018, 03:16:22 AM by Boris »

Re: CwntOS web panel - DNS/NameServer configuration
« Reply #1 on: February 06, 2018, 10:47:14 AM »
no redirect directives in the nginx vhost settings?

Offline
*
Re: CwntOS web panel - DNS/NameServer configuration
« Reply #2 on: February 06, 2018, 11:21:17 AM »
That was my NGINX conf for zammad.

Quote
upstream zammad-railsserver {
    server localhost:3000;
}

upstream zammad-websocket {
    server localhost:6042;
}

server {
    listen 80;

    # replace 'localhost' with your fqdn if you want to use zammad from remote
    server_name support.mydomain.com;

    root /opt/zammad/public;

    access_log /var/log/nginx/zammad.access.log;
    error_log  /var/log/nginx/zammad.error.log;

    client_max_body_size 50M;

    location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
        expires max;
    }

    location /ws {
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header CLIENT_IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_read_timeout 86400;
        proxy_pass http://zammad-websocket;
    }

    location / {
        proxy_set_header Host $http_host;
        proxy_set_header CLIENT_IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_read_timeout 300;
        proxy_pass http://zammad-railsserver;

        gzip on;
        gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
        gzip_proxied any;
    }
}


Re: CwntOS web panel - DNS/NameServer configuration
« Reply #3 on: February 06, 2018, 11:27:13 AM »
did you remove the public domain on port 80 now for posting here? Else should it not read

Quote
listen serverIP:80;
  server_name your.domain www.your.domain;