Close

Results 1 to 8 of 8
  1. #1
    DF Super Moderator
    DejaVu's Avatar
    Join Date
    Nov 2005
    Location
    Essex
    Posts
    9,107
    Thanks
    1,836
    Thanked:        4,004
    Karma Level
    953

    Default DNS. Sub domain to Domain:port

    I've got a number of services running on my network and own my own domain name using DNSExit for Dynamic DNS.

    I can change or add any DNS records using either my domain provider or DNS Exit.

    I want to create proxies via Apache or direct via DNS (SRV Record?) from http://sub.domain.com to http://domain:comort, but keep it cloaked so the port number doesn't show (not a redirect).

    Anyone able to give me an idiot's guide?

    Sent from my SM-G935F using Tapatalk


  2. #2
    DF VIP Member Mr.James's Avatar
    Join Date
    Nov 2000
    Location
    town
    Posts
    4,264
    Thanks
    233
    Thanked:        408
    Karma Level
    576

    Default Re: DNS. Sub domain to Domain:port

    Windows or Linux? If linux, does it have to be apache? I do more or less same thing with nginx and there's next to nothing to it to get it going.

  3. #3
    DF Super Moderator
    DejaVu's Avatar
    Join Date
    Nov 2005
    Location
    Essex
    Posts
    9,107
    Thanks
    1,836
    Thanked:        4,004
    Karma Level
    953

    Default Re: DNS. Sub domain to Domain:port

    I'm using Linux and have managed to setup a reverse proxy, but the response time from the server (in a VM) is painful and takes ages for information to transfer the proxy.

    I'm now looking at ways to do it via DNS directly, using SRV? Or even URL Forwarding with cloaking.

    Are you using Nginx reverse proxy?

    Sent from my SM-G935F using Tapatalk


  4. #4
    DF VIP Member Mr.James's Avatar
    Join Date
    Nov 2000
    Location
    town
    Posts
    4,264
    Thanks
    233
    Thanked:        408
    Karma Level
    576

    Default Re: DNS. Sub domain to Domain:port

    Yeah nginx is reverse proxying. I've not noticed any performance decrease at all.

    What linux distribution is it?

  5. #5
    DF Super Moderator
    DejaVu's Avatar
    Join Date
    Nov 2005
    Location
    Essex
    Posts
    9,107
    Thanks
    1,836
    Thanked:        4,004
    Karma Level
    953

    Default Re: DNS. Sub domain to Domain:port

    Linux Mint latest v17.3

    Sent from my SM-G935F using Tapatalk


  6. #6
    DF VIP Member Mr.James's Avatar
    Join Date
    Nov 2000
    Location
    town
    Posts
    4,264
    Thanks
    233
    Thanked:        408
    Karma Level
    576

    Default Re: DNS. Sub domain to Domain:port

    add the following two lines to your /etc/apt/sources.list file


    Code:
    deb http://nginx.org/packages/ubuntu/ trusty  nginx
    deb-src http://nginx.org/packages/ubuntu/ trusty  nginx

    download the nginx signing key:


    Code:
    cd ~
    wget http://nginx.org/keys/nginx_signing.key .

    add the key to the db:


    Code:
    apt-key add ~/nginx_signing.key

    update the list of installable apps:


    Code:
    apt-get update

    install nginx:


    Code:
    apt-get install nginx

    create the file for your website in /etc/nginx/conf.d/ for example mysite.conf


    Code:
    server {
    
    
        server_name sub.domain.net;
    
    
        listen 80;
    
    
    #    access_log            /var/log/nginx/access.log;
    #    error_log             /var/log/nginx/error.log;
    
    
        location / {
    
    
          proxy_set_header        Host $host;
          proxy_set_header        X-Real-IP $remote_addr;
          proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header        X-Forwarded-Proto $scheme;
          proxy_pass          http://domain.com:port/;
          proxy_read_timeout  90;
          proxy_redirect      off;
        }
    
    
    }

    then restart niginx


    Code:
    service nginx restart
    That should get it working, could tweak a bunch of stuff, like add SSL at the proxy to encrypt everything coming from the back end, but leave that for another day lol

    Thanks to Mr.James

    DejaVu (11th April 2016)  


  7. #7
    DF Super Moderator
    DejaVu's Avatar
    Join Date
    Nov 2005
    Location
    Essex
    Posts
    9,107
    Thanks
    1,836
    Thanked:        4,004
    Karma Level
    953

    Default Re: DNS. Sub domain to Domain:port

    Spot on!! I'll give it a try. Means I'll have get rid of Apache first. It's currently listening on port 80.

    Sent from my SM-G935F using Tapatalk


  8. #8
    DF VIP Member Mr.James's Avatar
    Join Date
    Nov 2000
    Location
    town
    Posts
    4,264
    Thanks
    233
    Thanked:        408
    Karma Level
    576

    Default Re: DNS. Sub domain to Domain:port

    Just change it to

    Code:
    listen 81;
    and that way you can test that it's fast enough and that it handles the reverse proxying correctly before committing to removing your apache installation.

    Thanks to Mr.James

    DejaVu (11th April 2016)  


Similar Threads

  1. Great Domain name for sale
    By Terry Turbo in forum Hall Of Shame
    Replies: 21
    Last Post: 16th February 2004, 08:13 PM
  2. domain name help
    By Robbie Vox in forum Web Hosting & Domain Names
    Replies: 6
    Last Post: 28th October 2002, 04:54 PM
  3. port forwarding .. how ???
    By maltloaf in forum PC Problems
    Replies: 2
    Last Post: 14th October 2002, 09:49 PM
  4. Infra red port for laptops
    By Aware in forum PC Hardware
    Replies: 2
    Last Post: 3rd September 2002, 10:35 PM

Social Networking Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •