Accessing ISPConfig externally and setting up subdomains

Discussion in 'Installation/Configuration' started by bradhawk, Nov 28, 2007.

  1. bradhawk

    bradhawk New Member

    Hello all,

    I'm very new to server setup. I follow the HowtoForge tutorial for the Gusty Gibbon Ubuntu 7.10 perfect server setup and installed ISPConfig. Very good tutorial by the way.

    The problem I'm now having is that I can't access ISPConfig outside of my LAN. When I'm in my LAN i can only access it by typing http://192.168.1.112:81 in my address bar (this is my local static IP address of my server)

    The domain that I'm hosting on this server is www.cougforlife.com which is registered through GoDaddy.com. I have setup GoDaddy.com to forward (masked) www.cougforlife.com to the IP address of my router. This works and when I type www.cougforlife.com in my address bar it brings up the home page of my site. The one problem with the masking, it keeps the address (www.cougforlife.com) in the address bar which is what I want but the title of the webpages isn't showing up in the title bar of IE7. How do I fix that?

    I talked to my ISP (Time Warner) and they told me that they don't block any ports. I do have port 81 forwarded within my router to point at the static IP of the server.

    My next question is how to set up sub-domains. I added a subdomain through GoDaddy.com called name.cougforlife.com. I forwarded that subdomain to point at the address of my router also. It is also masked. So whether I type name.cougforlife.com or www.cougforlife.com they both go to the home page right now.

    How do I use ISPConfig to set up name.cougforlife.com correctly so that when it is typed in the address bar 2 things happen. First, that the name stays in the address bar and second that it goes to the respective folder (i.e. /var/www/name) where my home page for that sub-domain is located?

    Like I said I'm a beginner and I need some help.

    Let me know if you need me to post any files that would be helpful in helping me solve my problems. Thanks.

    Thanks so much for any and all advice/help that I receive.
     
    Last edited: Nov 28, 2007
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please crete a DNS A-Record at godaddy that points to the IP address of your router. Forwards will not work correctly.

    1) Create a DNS A-Record at godaddy for the subdomain and not a forward.
    2) Create a website for the subdomain in ISPConfig.
     
  3. bradhawk

    bradhawk New Member

    A-Record

    How exactly do I do this? I tried to follow a tutorial once that talked about creating an A-record but had trouble finishing the tutorial. If you know of a solution or good tutorial that would be great! :)

    Okay, so when I created the subdomain through godaddy.com it created an A-record. I removed the forwarding.

    How exactly do I create the subdomain through ISPConfig? I go under ISPManager and click new site. After clicking next I put name as the hostname and cougforlife.com as the domain. I click Create DNS. Do I need to go under co-domains? What steps do I need to do to make it see where it is supposed to go? Thanks for all help.
     
    Last edited: Nov 30, 2007
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    thats ok and thats all, no other steps needed.

    No. You dont have to create DNS records, as you use the godaddy dns servers.
     
  5. bradhawk

    bradhawk New Member

    Help

    Okay it still isn't working. I need the help to be very explicit and very step by step.

    When I set up a new site in ISPConfig under ISPManager:

    Under basis:
    hostname : name
    domain : cougforlife.com
    ip address : same as Management -> Server -> Settings
    Create DNS : unchecked
    Create DNS-MX : unchecked

    Under User & Email:
    nothing listed

    Under Co-Domains:
    there is one listing with the same IP as before
    hostname: name
    domain: cougforlife.com

    Under Statistics, Options, Invoice:
    No changes/items to worry about.

    If I am doing something wrong please let me know. Because I feel like I've done what should be working but it still isn't. Thanks.
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Did you create a DNS record for name.cougforlife.com?
     
  7. bradhawk

    bradhawk New Member

    I created an A record through Godaddy.com but that's all. Do I need to have the create DNS box selected?
     
  8. falko

    falko Super Moderator ISPConfig Developer

    But there's no A record for name.cougforlife.com:

    Code:
    mh1:~# dig name.cougforlife.com
    
    ; <<>> DiG 9.2.1 <<>> name.cougforlife.com
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 56079
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;name.cougforlife.com.          IN      A
    
    ;; AUTHORITY SECTION:
    cougforlife.com.        10800   IN      SOA     ns15.domaincontrol.com. dns.jomax.net. 2007111400 28800 7200 604800 86400
    
    ;; Query time: 1083 msec
    ;; SERVER: 213.191.92.84#53(213.191.92.84)
    ;; WHEN: Sun Dec  2 19:22:17 2007
    ;; MSG SIZE  rcvd: 106
    
    mh1:~#
    Please create it in GoDaddy's web interface.
     
  9. bradhawk

    bradhawk New Member

    sorry, name.cougforlife.com was just an example. the actual subdomain that i'm testing right now is brad.cougforlife.com.

    i have changed my A records and these are what is registered now:
    @ (http://cougforlife.com)
    brad (http://brad.cougforlife.com)
    www (http://brad.cougforlife.com)

    thus, when you go to any of these pages they all access the same index.php page located in my /var/www folder

    i know the next step to setup a subdomain page is to add a site through ISPConfig. so my question goes back to the previous one.. i need to know the exact steps in how to create this site through ISPConfig.

    but i am now able to access ISPConfig externally through http://cougforlife.com:81

    Thanks for all your help thus far.
     
    Last edited: Dec 3, 2007
  10. falko

    falko Super Moderator ISPConfig Developer

    First you must create a client in ISPConfig, and then you can create a web site for that client in ISPConfig.
     
  11. bradhawk

    bradhawk New Member

    I have already created a client. Now what do I do to make a site.

    Also, I misspoke, I cannot access ISPConfig externally. Still can only access internally.

    Thanks for your help.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    To create a site, click on the button new site in the upper navigation bar of the ISP-Manager.
     
  13. bradhawk

    bradhawk New Member

    Okay, so I know I'm slow, but you guys can give me a little more than one small step at a time. If there is a tutorial to do this that would be great.

    I know that you click on the new site button. What I need is to know what I need to fill in in the forms when creating the site.

    Do I need to do this step-by-step through ISPConfig to create a main page for www.cougforlife.com? Because I didn't do that originally I just created an index.php file in the /var/www folder.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no tutorial. But you might want to have a look at the manuals which contain a description of all ISPConfig functions.

    Fill in the domain name, enable the features that you like and click on save.

    Yes. If you dont create a site in ISPConfiug, it will not be accessible.
     
  15. bradhawk

    bradhawk New Member

    I understand that there are manuals for ISPConfig. I didn't understand them that is why I am coming to you guys. I created a site through ISPConfig for both www.cougforlife.com and brad.cougforlife.com. The only things I did when creating this site is select what features it should have and entered the hostname and domain on the first tab. I did not go to any of the other tabs when creating these sites. Still, when I go to these addresses it points to the same page which is the index.php file that is in my /var/www folder. How do I make them go to the folders that ISPConfig creates?

    Also, I AM able to access ISPConfig remotely now. When I said that I couldn't I was connected to the internet via my school VPN and they must not allow accessing ports through their VPN. But I am able to access it externally now.
     
  16. falko

    falko Super Moderator ISPConfig Developer

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

    bradhawk New Member

    Here is Vhosts_ispconfig.conf


    Code:
    ###################################
    #
    # ISPConfig vHost Configuration File
    #         Version 1.0
    #
    ###################################
    #
    NameVirtualHost 192.168.0.1:80
    <VirtualHost 192.168.0.1:80>
      ServerName localhost
      ServerAdmin [email protected]
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: www.cougforlife.com:80
    ######################################
    #
    #
    <VirtualHost 192.168.0.1:80>
    ServerName www.cougforlife.com:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web14/web
    ServerAlias cougforlife.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
    ScriptAlias  /cgi-bin/ /var/www/web14/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web14/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/web14/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web14/phptmp/
    php_admin_value session.save_path /var/www/web14/phptmp/
    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/web14/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/web14/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web14/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    ######################################
    # Vhost: brad.cougforlife.com:80
    ######################################
    #
    #
    <VirtualHost 192.168.0.1:80>
    ServerName brad.cougforlife.com:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web15/web
    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
    ScriptAlias  /cgi-bin/ /var/www/web15/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web15/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/web15/
    php_admin_value file_uploads 1
    php_admin_value upload_tmp_dir /var/www/web15/phptmp/
    php_admin_value session.save_path /var/www/web15/phptmp/
    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/web15/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/web15/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web15/user/$1/web/$3
    </VirtualHost>
    #
    #
    #
    
    Here is the output of ifconfig

    Code:
    [email protected]:/var/www# ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:40:2B:77:37:3E  
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
              Interrupt:20 
    
    eth1      Link encap:Ethernet  HWaddr 00:0C:41:5F:E4:1A  
              inet addr:192.168.1.112  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::20c:41ff:fe5f:e41a/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:76692 errors:0 dropped:123610 overruns:0 frame:0
              TX packets:11252 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:9727899 (9.2 MB)  TX bytes:3180334 (3.0 MB)
              Interrupt:11 Base address:0x4000 
    
    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:2611 errors:0 dropped:0 overruns:0 frame:0
              TX packets:2611 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:186015 (181.6 KB)  TX bytes:186015 (181.6 KB)
    
    [email protected]:/var/www# 
    
    Thanks for your help!
     
  18. falko

    falko Super Moderator ISPConfig Developer

    You're using the IP address 192.168.0.1 in Vhosts_ispconfig.conf, but that IP is not listed in the output of ifconfig. Either use 192.168.1.112, or add a network interface with the IP 192.168.0.1.
     
  19. bradhawk

    bradhawk New Member

    Thanks!!

    Changing the IP to 192.168.1.112 fixed it!!

    I didn't bother changing it originally because that's how it came after the install. Thanks so much for everyone's help!!
     

Share This Page