This IP address is shared - HELP

Discussion in 'Installation/Configuration' started by razvan_vlad, Jul 4, 2008.

  1. razvan_vlad

    razvan_vlad New Member

    hey guys,
    i know i'm missing something small here but i need help:
    i got ISPConfig 2.2.23 with Fedora 9 (followed the LDAP server howto).
    i'm behind a router on which i forwarded port 80 to my server.
    now..everytime i access the websites created with ISPConfig from outside network (internet), they do show up. However, within my local network, I always get the SHARED IP page for all of them.

    I read the documentation and they say to check if the IP addresses in the list on the Basis tab in ISPConfig are not doubled and also check if the IP defined for a specific website is one defined on the server and not my external/public ip. I did check those but i still get shared ip page.

    When i checked the whost_ispconfig file, after i deleted the first section "NameVirtualHost" ( so it remained just the 2nd option "<VirtualHost 192.........:80>) everything went fine. But ISPConfig rewrites this file everytime i made adjustments in ISP.

    Any suggestions please?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Did you use the correct addresses from within your LAN to access the web sites? IP addresses do not work.

    What's the output of
    Code:
    ifconfig
    , and what's in Vhosts_ispconfig.conf?
     
  3. Theophilus

    Theophilus New Member

    Check that there is not something like:

    in the ispconfig log file (/home/admispconfig/ispconfig/ispconfig.log). I had the same problem your experiencing and found there was a problem with the syntax in my apache config.

    Hope this helps :)
     
  4. razvan_vlad

    razvan_vlad New Member

    This IP is shared

    Falko:
    this is my ifconfig output:

    eth0 Link encap:Ethernet HWaddr 00:50:8B:65:EF:CA
    inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::250:8bff:fe65:efca/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:2310 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2566 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:1534451 (1.4 MiB) TX bytes:399984 (390.6 KiB)

    eth0:0 Link encap:Ethernet HWaddr 00:50:8B:65:EF:CA
    inet addr:192.168.1.14 Bcast:192.168.1.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

    eth0:1 Link encap:Ethernet HWaddr 00:50:8B:65:EF:CA
    inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:2480 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2480 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:124876 (121.9 KiB) TX bytes:124876 (121.9 KiB)
     
  5. razvan_vlad

    razvan_vlad New Member

    Theophilus:

    this is one line i got in the log:

    24.06.2008 - 00:09:25 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2022: cp -fr /etc/proftpd_ispconfig.conf /etc/proftpd_ispconfig.conf~

    or this:

    05.07.2008 - 08:31:59 => INFO - /root/ispconfig/scripts/lib/classes/ispconfig_system.lib.php, Line 728: /etc/rc.d/init.d/httpd restart &> /dev/null



    but there are a bunch of others also.
    Any help?

    thanks
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check that you forwarded port 80 in your router to the same internal IP address, that you selecetd for the website in ISPCOnfig. Then make sure, that the domain points to the external IP of your router.
     
  7. razvan_vlad

    razvan_vlad New Member

    till,

    the server's principal address is 192.168.1.10.
    I also created other IPs: 192.168.1.14 (as you can see in my previous post.. the output of ifconfig.
    On the router, i forwarded port 80 to 192.168.1.10.
    Then, i have some domains with dyndns which point to my external ip.

    Everything works fine if websites are accessed from outside my local network.
    When accessed within my network: 1) with the IPs, i always get the Shared IP page
    2) with the domain name, i always get "the page can't be displayed "

    Thanks.
     
  8. razvan_vlad

    razvan_vlad New Member

    i want to give you guys more details but in the shortest way possible, i don't want to post here like 100 pages:
    Server:
    Fedora 9; ISPConfig 2.2.23; Firewall: disabled; SuExec: disabled;
    httpd.conf:
    Code:
    <Directory /var/www/*/web>
        Options +Includes -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    <Directory /var/www/sharedip>
        Options +Includes -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    <Directory /var/www/*/cgi-bin>
        Options ExecCGI -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    Include /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf
    
    Vhosts_ispconfig.conf:
    Code:
    #
    NameVirtualHost 192.168.1.10:80
    <VirtualHost 192.168.1.10:80>
      ServerName localhost
      ServerAdmin root@localhost
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    NameVirtualHost 192.168.1.14:80
    <VirtualHost 192.168.1.14:80>
      ServerName localhost
      ServerAdmin root@localhost
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    
    ######################################
    # Vhost: domain1.com:80
    ######################################
    
    <VirtualHost 192.168.1.14:80>
    ServerName domain1:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web3/web
    ServerAlias domain1.com
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
    Alias  /cgi-bin/ /var/www/web3/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web3/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_flag safe_mode Off
    <IfModule mod_ruby.c>
      <Directory /var/www/web3/web>
        Options +ExecCGI
      </Directory>
      RubyRequire apache/ruby-run
      #RubySafeLevel 0
      <Files *.rb>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
      <Files *.rbx>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
    </IfModule>
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
    AddType application/vnd.wap.wmlscriptc .wmlsc .wsc
    AddType text/vnd.wap.wml .wml
    AddType text/vnd.wap.wmlscript .ws .wmlscript
    AddType image/vnd.wap.wbmp .wbmp
    Alias /error/ "/var/www/web3/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web3/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web3/user/$1/web/$3
    </VirtualHost>
    
    ######################################
    # Vhost: domain2.com:80
    ######################################
    
    <VirtualHost 192.168.1.14:80>
    ServerName domain1:80
    ...
    ..
    
    
    ISPConfig:
    Management->Server->Settings->Server tab:
    Code:
    Domain: domain2.com
    IP Address: 192.168.1.10
    IP List: 192.168.1.14
    Management->Server->Settings->Web tab:
    Code:
    Document root: /var/www
    Management->Server->Settings->DNS tab:
    Code:
    Default NS1: www.domain2.com
    Default NS2: www.domain2.com
    ISP Manager:
    No reseller; One Client (client1); 2 websites under client1: domain1 & domain2
    domain1:
    Basis tab:
    Code:
    Domain: domain1.com
    IP Address: 192.168.1.10
    
    domain2:
    Basis tab:
    Code:
    Domain: domain2.com
    IP Address: 192.168.1.14
    
    DNS Manager:
    domain2.com:
    Domain tab:
    Code:
    Domain (SOA): domain2.com 
    IP Address: 192.168.1.14
    Records tab:
    Code:
    A record: IP Addresse: 192.168.1.14   Host: * 
    THANK YOU for those who take the time to read and help me.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    You must either forward port 80 to the IP On the router, 192.168.1.14 or change the IP addresses of the websites in ISPConfig to 192.168.1.10.

    In the DNS-Manager, you must change all IP addresses to the external IP of your router.
     
  10. biobrew

    biobrew New Member

    An easy shortcut to see sites from inside your network:

    Edit the hosts file on the machine you wish to see the site and type:

    on windows: c:windows\system32\drivers\etc\hosts
    (note: run notepad as administrator on vista)
    yoursitename.com internal.ip.address

    on linux: /etc/hosts
    internal.ip.address yoursitename.com


    Not sure if that helps you or not but it's how I edit stuff locally and still see the output at domain.com instead of using the ip address when inside my own network.
     
  11. razvan_vlad

    razvan_vlad New Member

    till,
    thanks for the reply. I tried to forward 192.162.1.14:80 on the router but since i already have the port 80 forwarded this won't allow me to do so. I am at work and when i get home i'll change the IP Address in the DNS-Manager to point to my external/public IP and see how it will go.

    biobrew,
    i already tried that, however this is useful when you don't have the domain names defined (i'm using dyndns though). This just allows me to put the domain.com instead using the IP on the local machine, but for the server is the same thing. :).

    Like i said, when accessed from outside my local network, the websites work just fine, but locally they all point to the same shared IP address.
     
  12. razvan_vlad

    razvan_vlad New Member

    till,
    i did remove all the IP's in ISPC's list so now there's just 192.168.1.10 in the IP address field. So the website's ip is this one.. I also changed the IP in the DNS-Manager to point to 1) my external IP address (the one the domain name at dyndns points to) and 2) my router's ip address (192.168.1.1) but they don't help. I also removed the DNS entries for the website but still didn't work.

    Then I created just one website in ISPConfig and then went to vhosts_ispconfig.conf and removed the first section where the DocumentRoot points to /var/www/sharedip then it worked.

    So it seems the problem is that whenever the access of a specific website is made, it will always go to DocumentRoot in the first section (sharedip) of vhost_ispconfig.conf and not to the 2nd one where the actual website's location is (/www/web1).
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    This is no solution to the problem as it is not nescessary to remove this.

    If you still get the shared IP page, then your domain does still not point to the correct IP. Please check this again. Also make sure that you did not use any kind of redirect at the domain registry were you registered the domain. It must be a dns A-Record!
     
  14. razvan_vlad

    razvan_vlad New Member

    hey guys,
    i found out what the problem was:
    i have bought a domain name : www.domain.com then the server was setup on this domain. Also it appeared under the Domain section in ISPConfig->Management->Server->Settings. Then, i wanted to manage the website for this domain from ISPConfig, so i went and added a new website with the same domain (stupid mistake) - so this caused all the other websites to point to a Shared IP page within my local network. After i deleted the website with domain name: www.domain.com; i could access the websites locally by their IP address. So then, on my client, in windows, i went to C:\Windows\System32\drivers\etc and edited the host.conf (added the ip address to the corresponding domain name). Now I am able to access the websites with their domain name also.

    Now: all my websites point to the right folder (either from outside or locally). I have only one IP set up for the server (the IP List in ISPConfig is empty). However, if i go to www.domain.com, it points towards the Shared IP page.

    Also would like someone to explain me how the thing with more than one IP address is working/should be used (if i add another IP address in the list, and put a new website on that IP, it will say it is shared). If i add the 2nd ip in the list, do i have to create a virtual eth0:1 file also?

    Thanks guys,
    Raz.
     
  15. falko

    falko Super Moderator Howtoforge Staff

    What's in Vhosts_ispconfig.conf, and what's the output of
    Code:
    ifconfig
    ? Is www.domain.com listed in Vhosts_ispconfig.conf?

    Is the server behind a router (i.e., are you using NAT)?
     

Share This Page