Results 1 to 4 of 4

Thread: URL for internal network

  1. #1
    Join Date
    Sep 2006
    Location
    Maryland, USA
    Beans
    260
    Distro
    Ubuntu 12.04 Precise Pangolin

    URL for internal network

    I have an Ubuntu server setup and have installed LAMP and would like to install Drupal. Everything is up and running, but when I install Drupal and the underlying application, the main URL gets stored in the application.

    For example, if I am out on the Internet, I can get to the Apache server using something like "https://mydrupal.outsidenetwork.com". But if I install the application from the Internet, I cannot use it internal to my home network because the application has stored the URL for redirection purposes and based on the rules imposed by my ISP, it will not allow me to reflect back from my home network.

    If I have installed the application from my internal home network using the internal IP, I cannot access the application from the Internet due to the same application redirection issue.

    Anyway, is there someway to be on my internal home network and have the Internet defined URL go to the internal IP address so I can work on the application inside and outside? For example, mydrupal.outsidenetwork.com will go to the correct IP address if I'm outside my home network and got to my internal IP address when I'm on my home network?

    I thought about using /etc/host file, but wondered if that would work or if there's a better way.

    Hope this make sense....
    Impari Systems, Inc
    http://www.imparisystems.com

  2. #2
    Join Date
    Oct 2017
    Location
    /dev/sdx
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: URL for internal network

    This should be the CName, A, and @ the domain name settings. pointing of the name from the static address. I'm thinking of the static IP settings pointing to the domain and your domain registration. Are you talking about pointing your domain? or did you try to run your drupal thing using you IP? this is a subdomain thing I think;

    https://"mydrupal" ----> Subdomain
    and your
    outsidenetwork.com ---> main domain. Am I right? this is the one who bring the static IP address.
    Last edited by mIk3_08; May 6th, 2021 at 03:11 PM.
    corn ubuntuforums community.
    Open Source platform where the real world of human is here. Click here for Solve thread

  3. #3
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: URL for internal network

    Yes, I would first try the /etc/hosts file. (This file exists on Windows machines as well at C:\Windows\System32\Drivers\etc\hosts.)

    Edit the file as root with "sudo nano /etc/hosts" and add a line that reads:

    Code:
    server.inside.ip.addr     mydrupal.outsidenetwork.com
    You must make this change on any client machines that might connect to the server.

    A more global solution would be to run a local DNS server on your network with local records for outsidenetwork.com. For instance, my domain's public-facing DNS records are hosted on servers in the cloud. However I also have an instance of BIND9 running on my local server that's also authoritative for my domain. I point local clients at that server so they get answers within the local network.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  4. #4
    Join Date
    Oct 2017
    Location
    /dev/sdx
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: URL for internal network

    you can also create your own diretory to make sites-available:
    Code:
    mkdir sites-available
    inside the directory sites-available create a file .conf:
    Code:
    sudo vim mydrupal.outsidenetwork.com.conf
    then add the ff code:
    Code:
    server{
            listen          80; 
            server_name     mydrupal.outsidenetwork.com; 
            location /{
                    root /var/www/mydrupal.outsidenetwork.com/public_html;
                    index index.html;
                    }
    }
    then save the file:
    in your nginx.conf file add the ff code:
    Code:
    include /etc/nginx/sites-available/*.conf;
    then save the file.
    Then restart nginx:
    Code:
    sudo systemctl restart nginx.service
    corn ubuntuforums community.
    Open Source platform where the real world of human is here. Click here for Solve thread

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
  •