Close

Results 1 to 8 of 8
  1. #1
    DF Super Moderator
    DejaVu's Avatar
    Join Date
    Nov 2005
    Location
    Essex
    Posts
    9,100
    Thanks
    1,834
    Thanked:        3,998
    Karma Level
    957

    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 [Only registered and activated users can see links. ] to [Only registered and activated users can see links. ], 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 Jedi Mr.James's Avatar
    Join Date
    Nov 2000
    Location
    town
    Posts
    4,264
    Thanks
    232
    Thanked:        408
    Karma Level
    533

    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,100
    Thanks
    1,834
    Thanked:        3,998
    Karma Level
    957

    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 Jedi Mr.James's Avatar
    Join Date
    Nov 2000
    Location
    town
    Posts
    4,264
    Thanks
    232
    Thanked:        408
    Karma Level
    533

    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,100
    Thanks
    1,834
    Thanked:        3,998
    Karma Level
    957

    Default Re: DNS. Sub domain to Domain:port

    Linux Mint latest v17.3

    Sent from my SM-G935F using Tapatalk


  6. #6
    DF Jedi Mr.James's Avatar
    Join Date
    Nov 2000
    Location
    town
    Posts
    4,264
    Thanks
    232
    Thanked:        408
    Karma Level
    533

    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,100
    Thanks
    1,834
    Thanked:        3,998
    Karma Level
    957

    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 Jedi Mr.James's Avatar
    Join Date
    Nov 2000
    Location
    town
    Posts
    4,264
    Thanks
    232
    Thanked:        408
    Karma Level
    533

    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. why do i have or need a domain?
    By 9obamartins in forum Android Phones & Tablets
    Replies: 2
    Last Post: 13th September 2015, 02:53 PM
  2. I want to buy a taken domain name....
    By Gel in forum Web Hosting & Domain Names
    Replies: 2
    Last Post: 21st January 2008, 12:31 PM
  3. Redirect domain to another domain/page
    By Drogo in forum Website Coding & Graphics
    Replies: 3
    Last Post: 3rd May 2007, 03:47 PM
  4. Domain name help ...
    By The Toker in forum Web Hosting & Domain Names
    Replies: 2
    Last Post: 29th May 2005, 02:03 AM
  5. Domain down?
    By stimpy in forum Forum Bug & Error Reports
    Replies: 7
    Last Post: 15th January 2005, 04:59 AM

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
  •