Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2008
    Posts
    64

    Change public_html for IP Address?

    My server has one IP address assigned to it and i use Webmin with Virtualmin to manage domains.

    When you put my IP into a browser like http://00.00.00.00 however, it points to my websites public_html folder at /home/username/public_html, which was the first domain i set up.

    I would like to change it so that the IP points to its own folder: /var/www/html when entered into a browser.. how do i do this?

    Thanks

  2. #2
    Join Date
    May 2008
    Location
    Sweden
    Posts
    152
    In httpd.conf, put the first Virtual entry for the IP to document root /var/www/html

  3. #3
    Join Date
    Jan 2008
    Posts
    64
    Ok i opened up httpd.conf and the first VirtualHost entry is the one for my domain, so if i change it like you said wont that make my domain change to /var/www/html aswell?

    This is my first virtualhost entry:

    <VirtualHost 00.00.00.00:80>
    SuexecUserGroup "#500" "#501"
    ServerName domain.co.uk
    ServerAlias www.domain.co.uk
    DocumentRoot /home/username/public_html
    ErrorLog /home/username/logs/error_log
    CustomLog /home/username/logs/access_log combined
    ScriptAlias /cgi-bin/ /home/username/cgi-bin/
    DirectoryIndex index.html index.htm index.php index.php4 index.php5

    (Edited my servers IP and domain/username out)

  4. #4
    Join Date
    Aug 2007
    Location
    India
    Posts
    117
    Yes, so you have to add another virtual host entry above the first entry as follows:

    <VirtualHost x.x.x.x>
    ServerName host.domain.com
    DocumentRoot /var/www/html
    </VirtualHost>

    Make sure to restart apache after editing the apache conf
    Anoop
    █ Freelance Linux Admin
    Email: tracerouteme [at] gmail.com

  5. #5
    Join Date
    Jan 2008
    Posts
    64
    Sorted it, Thanks for your help

Posting Permissions

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