skip to Main Content

I have a VPS server on Hostgator that is a semi-managed server, meaning:
Virtual Private Servers that does not include a web hosting control panel (cPanel or Plesk), so I am working from Putty.

I have the ability to get to my website on the server by entering the IP address in a browser window, but not through the domain name. Does anyone have any idea of which file I need to edit so the site can be resolved by name?

Thanks.

2

Answers


  1. If you like this ‘visibility’ to be set up for you only then edit windowssystem32driversetchosts file. Otherwise you have to contact your ISP to set up a DNS records for this IP.

    P.S. this question is off topic at stackoverflow

    Login or Signup to reply.
  2. The file is

        /etc/apache2/sites-available/default
    

    To create a new site:

    Copy the default website as a starting point. sudo cp /etc/apache2/sites-available/default
    /etc/apache2/sites-available/mysite

    Edit the new configuration file in a text editor “sudo nano” on the command line or “gksudo gedit”, for example: gksudo gedit
    /etc/apache2/sites-available/mysite

    Change the DocumentRoot to point to the new location. For example, /home/user/public_html/

    Change the Directory directive, replace to

    You can also set separate logs for each site. To do this, change the ErrorLog and CustomLog directives. This is optional, but handy if
    you have many sites
    Save the file

    Check out this site about configuring a LAMP server

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search