ISPConfig - from fixed IP to dynamic IP

Discussion in 'Installation/Configuration' started by Moso, Jan 11, 2008.

  1. Moso

    Moso New Member

    Hi everbody! :)

    I was using ISPConfig in a Ubuntu 7.10 with a fixed IP.

    I was forced to change to dynamic IP and now my two websites don't work anymore from the internet.

    Whenever I access my domains I get a directory list as below:

    Code:
    Index of /
    	Name	Last modified	Size	Description
    	apache2-default/	20-Nov-2004 18:16 	-
    	localhost/	30-Oct-2007 00:30 	-
    	sharedip/	25-Oct-2007 16:23 	-
    	web1/	10-Jan-2008 20:58 	-
    	web2/	10-Jan-2008 20:58 	-
    	webalizer/	10-Jan-2008 06:26 	-
    	www.aadce.org.br/	10-Jan-2008 20:58 	-
    	www.cyberfreaks.com.br/	10-Jan-2008 20:58 	-
    From the internal LAN (192.168.1.0) both sites work correct.

    What I need to change to the sites work also from internet?

    Thanking in advance,
    Moso
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If you have a dynamic IP address, you will have to use a service like dyndns to point your domains always to the correct external IP address.
     
  3. Moso

    Moso New Member

    Hi till!

    I'm using http://www.everydns.net/ to manage my dynamic IP address.

    My two dynamic domains, cyberfreaks.com.br and aadce.org.br were created there and the perl client was put in my rc.local.

    I already checked and both dynamic domais point to the correct dynamic IP address.

    As I mentioned before, if I am inside my LAN (192.168.1.*) in any browser www.cyberfreaks.com.br, cyberfreaks.com.br, www.aadce.org.br or aadce.org.br opens the site correctly.

    But connections outside my local area network (internet) opens a "Index of /" page with the content of my /var/www directory instead of the proper site.

    What I must do in ISPConfig to show the site instead the "Index of /" page?

    In the ISPConfig -> ISP Manager -> Sites -> Basis -> IP Address field I put the internal IP address 192.168.1.254.

    Anyway, thanks for reply! ;)
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Open the settings of every site, make sure that the correct internal domain is selected and click on the save button. to update the settings of the site.
     
  5. Moso

    Moso New Member

    Still no success... :confused:

    Any other ideas/tips?
     
  6. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ifconfig
    , and what's in your Vhosts_ispconfig.conf?
     
  7. Moso

    Moso New Member

    Hi falko!

    Thanks for try to help. :D

    Bellow is the output of ifconfig command

    Code:
    eth0      Link encap:Ethernet  HWaddr 00:08:54:45:D6:82
              inet6 addr: fe80::208:54ff:fe45:d682/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:60574 errors:0 dropped:0 overruns:0 frame:0
              TX packets:93018 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:7652536 (7.2 MB)  TX bytes:105697021 (100.8 MB)
              Interrupt:11 Base address:0xaf00
    
    eth1      Link encap:Ethernet  HWaddr 00:0A:E6:DC:0D:43
              inet6 addr: fe80::20a:e6ff:fedc:d43/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:64421 errors:0 dropped:0 overruns:0 frame:0
              TX packets:51603 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:71989149 (68.6 MB)  TX bytes:7616151 (7.2 MB)
              Interrupt:11 Base address:0xd400
    
    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:533 errors:0 dropped:0 overruns:0 frame:0
              TX packets:533 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:71451 (69.7 KB)  TX bytes:71451 (69.7 KB)
    
    ppp0      Link encap:Point-to-Point Protocol
              inet addr:189.27.240.136  P-t-P:189.27.240.1  Mask:255.255.255.255
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
              RX packets:63915 errors:0 dropped:0 overruns:0 frame:0
              TX packets:51090 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:3
              RX bytes:70552375 (67.2 MB)  TX bytes:6476453 (6.1 MB)
    
    tap0      Link encap:Ethernet  HWaddr 00:FF:A7:50:04:36
              inet6 addr: fe80::2ff:a7ff:fe50:436/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:22829 errors:0 dropped:0 overruns:0 frame:0
              TX packets:15710 errors:0 dropped:51 overruns:0 carrier:0
              collisions:0 txqueuelen:500
              RX bytes:25582148 (24.3 MB)  TX bytes:952668 (930.3 KB)
    And bellow is the content of Vhosts_ispconfig.conf file.

    Code:
    ###################################
    #
    # ISPConfig vHost Configuration File
    #         Version 1.0
    #
    ###################################
    #
    NameVirtualHost 192.168.1.254:80
    <VirtualHost 192.168.1.254:80>
      ServerName localhost
      ServerAdmin root@localhost
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: www.cyberfreaks.com.br:80
    ######################################
    #
    #
    <VirtualHost 192.168.1.254:80>
    ServerName www.cyberfreaks.com.br:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web1/web
    ServerAlias cyberfreaks.com.br
    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
    ErrorLog /var/www/web1/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    <Files *.php>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php3>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php4>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php5>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode On
    php_admin_value open_basedir /var/www/web1/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web1/phptmp/
    php_admin_value session.save_path /var/www/web1/phptmp/
    Alias /error/ "/var/www/web1/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/web1/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web1/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    ######################################
    # Vhost: www.aadce.org.br:80
    ######################################
    #
    #
    <VirtualHost 192.168.1.254:80>
    ServerName www.aadce.org.br:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web2/web
    ServerAlias aadce.org.br
    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
    ErrorLog /var/www/web2/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    <Files *.php>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php3>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php4>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    <Files *.php5>
        SetOutputFilter PHP
        SetInputFilter PHP
    </Files>
    php_admin_flag safe_mode On
    php_admin_value open_basedir /var/www/web2/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web2/phptmp/
    php_admin_value session.save_path /var/www/web2/phptmp/
    Alias /error/ "/var/www/web2/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/web2/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web2/user/$1/web/$3
    </VirtualHost>
    #
    #

    :cool:
     
  8. falko

    falko Super Moderator Howtoforge Staff

    You're using the wrong IP address in ISPConfig. It should be 189.27.240.136 (the one of the PPPoE adapter), but you're using 192.168.1.254.
     
  9. Moso

    Moso New Member

    Hi falko! :)

    Thank you for your help.

    Once a time I made it work putting the external dynamic IP address.

    There is a way of change the IP address in ISPConfig automatically every time the IP address change?

    This will happen on server reboots and sometimes on ADSL signal lost/reconnection.

    DNS where solved with that perl client that http://www.everydns.net/ provides... :rolleyes:

    Best regards,
    Moso
     
  10. falko

    falko Super Moderator Howtoforge Staff

    No, unfortunately not...
     
  11. tensor

    tensor New Member

    Will 0.0.0.0 work?
     
  12. falko

    falko Super Moderator Howtoforge Staff

    I don't think so... You could try *, but I don't know if it works...
     

Share This Page