Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,372
    Plugin Contributions
    4

    Default Question on hosts file

    I have a web server on my local computer and zen cart installed.
    However it cannot be seen on the internet.
    Here is the /etc/hosts file:
    Code:
    127.0.0.1    localhost
    127.0.1.1    crosshair
    127.0.0.1    zentest.com
    127.0.1.1    crosshair.zentest.com crosshair
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    Now my question is, supposing I installed a Debian web server on a server connected to the internet and I already fixed the A record and everything. My IP would be something like 324.125.968.32, how should the hosts file read??

  2. #2
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,372
    Plugin Contributions
    4

    Default Re: Question on hosts file

    SOLVED, answer is very simple: as I said this is a local test server so it is not visible on the internet, 127.0.0.1 is a loopback adress to same computer that is hosting the website.
    It is usual that default files are installed upon installation of Debian, thus:
    127.0.0.1 localhost, is the default and only line
    BUT
    if you want your site to show you must add a line:
    my IP mysite.com
    then reload web server: systemctl reload apache2.
    DONE

 

 

Similar Threads

  1. File question
    By stevefriedman71 in forum General Questions
    Replies: 1
    Last Post: 5 Feb 2011, 09:00 PM
  2. Editing the hosts file
    By txccider in forum Installing on a Windows Server
    Replies: 8
    Last Post: 11 Apr 2009, 01:16 PM
  3. set up standalone "example.com" domain in Windows XP - editing hosts file
    By lieven23 in forum Installing on a Windows Server
    Replies: 7
    Last Post: 16 Jan 2009, 08:16 AM
  4. Changing Hosts Question
    By Crimson_Wake in forum General Questions
    Replies: 5
    Last Post: 29 Oct 2008, 09:03 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR