how I can access web by ipaddress

Discussion in 'Installation/Configuration' started by nysprite, Jun 26, 2006.

  1. nysprite

    nysprite New Member

    Hi All
    I wunder waiting for domain processing. How I can open web by ip address..

    http://192.168.1.2/~www.example.com/ ???

    I have trying edit httpd.conf follow as :

    UserDir public_html

    <Directory /var/www/*/user/*/web>
    Options +Includes -Indexes
    AllowOverride None
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
    </Directory>

    Thank you for any help..
    * sorry for my english

    Sprite
     
  2. erk

    erk New Member HowtoForge Supporter

    All requests for a pure ip number (no hostname) will be taken care of by the first virtual host entries in /etc/apache2/vhosts/Vhosts_ispconfig.conf.
    First in that file you will find:

    Code:
    NameVirtualHost 192.168.1.2:80
    <VirtualHost 192.168.1.2:80>
      ServerName localhost
      ServerAdmin root@localhost
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    
    When only the ip number is used apache will give you the first virtualhost matching the ip.

    So, (this is maybe not a nice solution but it should work :) ) edit the Vhost file so your website IS the first virtualhost in the file. Just remember that any changes will be lost as soon as you edit a site in ISPConfig.

    //Erk

    PS. /etc/apache2/vhosts/Vhosts_ispconfig.conf could also be /etc/httpd/vhosts/Vhosts_ispconfig.conf or similar, depending on OS.
     
  3. falko

    falko Super Moderator Howtoforge Staff

  4. nysprite

    nysprite New Member

    Thank you very much.

    Thank you for all answer.
     

Share This Page