Setting up webhosting in ISPConfig 3

Discussion in 'General' started by khan, Jul 16, 2009.

  1. khan

    khan New Member

    Its a rookie question, I have never had web hosting server i thought its easier to install ISPConfig so i followed the tutorial http://www.howtoforge.com/perfect-server-ubuntu-9.04-ispconfig-3 to install, i have everything setup but I cant get my site to show up :(

    I have two server that i want to host, www.server1.com and www.server2.com; server1.com was setup at the time of installation but I added server2.com ...

    This is what i did ---> System tab - Add Server config - and then i have added following values in the tab "Server"

    server config
    -----------
    Network Configuration (not checked)
    IP Address 127.0.0.1
    Netmask 255.255.255.0
    Gateway 192.168.0.1
    Hostname server2.com
    Nameservers ns11.domaincontrol.com, ns12.domaincontrol.com

    I left rest of the tabs blank since, i just want to see if i can get to default page or not... CLIENT -- Company name, Contact name, Username, password.... EMAIL -- Server, Client=xyz, Domain, Spamfilter = normal ; Active checked .... SITES -- WEBSITE -- Server,Client=xyz,IP-Address=*,
    Domain=server2.com, Harddisk Quota 1000 MB, (CGI,SSI,Own Error-Documents)=checked, ,SuEXEC not,Auto-Subdomain=www,SSL, PHP=ModPHP, Active=checked ... Rest of the tabs left blank but when i click on OPTIONS and go to previous tab i get this ERROR 1.documentroot_error_empty while there is no tab for "documentroot" but LinuxUser=web1, LinuxUser=client1,AppacheDirective=blank

    When I type url outside network i dont get the page, but within my network i reach my wireless router Admin Setup page ???

    My default setup during installation for server1.com
    -----------
    Network Configuration (not checked)
    IP Address 127.0.0.1
    Netmask 255.255.255.0
    Gateway 192.168.0.1
    Hostname server1.com
    Nameservers 192.168.0.1, 192.168.0.2


    Please help...

    My domain name is by godaddy, i have A-record for server1, and server2 pointing to my public ip address.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can not add servers like that. You will have to delete the server entry as it is not connected with any server.

    To add a server, install ispconfig on the second server in expert mode and then choose that this server shall join the master server.

    Running a multi servers etup is not as easy as running a single server as you have to set correct mysql access permissions to allow the root user of the slave servers to connect to the mysql database of the master server before you install ispconfig, so if this is your first server you might want to start with a single server setup and when you get more comfortable with managing linux servers then extend your setup with more servers.
     
    Last edited: Jul 16, 2009
  3. khan

    khan New Member

    Thanks Till for your response:

    Awww my understanding is wrong, let me put down my objective:
    On a single hosting server i would like to have multiple web-sites hosted.
    I have 5 websites that i want to put on this server, i want to have each website its own mail boxes and user accounts...

    *** I did install ISPConfig 3 in expert mode, and i have "server1.com" already setup during the process of installation. (Please see its setup in my post to verify if its been setup correctly) ***

    Questions:
    1. After i remove the server2.com how do i put all these 5 websites hosted (e.g. website1.com, website2.com, ...)?
    2. Do i have to have my AAA record at godaddy to point to my public ip for all those websites (i am assuming yes)
    3. Do I have to have ns11.domaincontrol.com, ns12.domaincontrol.com in NameServer of SERVER1.COM or do i leave my local IP addresses there in that field.
    4. How about the error i get in Website-Options tab?
    (OPTIONS does not let me out i get this ERROR "documentroot_error_empty" while there is no tab for "documentroot" It only has LinuxUser=web1, LinuxUser=client1,AppacheDirective=blank)

    Any step by step guide for ISPConfig3 is appreciated, i found many for ISPConfig2 but nothing for 3...

    Thanx in advance :)
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    1) You dont have a second server at the moment as you just added a record manually to the databse without any connection to a real server. You will have to delete any records that you assigned to this server in ispconfig.
    2) Yes. You always need a dns record for a website.
    3) The nameservcers must be exsiting and working nameservers that are used to resolve external domain names.
    4) This error is there because you did not add the server correctly. See my other post.

    there are no other manuals for ispconfig 3 available yet and as I suggested to you above you should start with a single server setup wheny you are not familar with linux administration.
     
  5. khan

    khan New Member

    Thanks Till

    I removed the server2.com which I added after installation; from my ispconfig3 setup, I also removed all the related setups. Server1 was installed during installation process and configured by ISPConfig. I did not change anything in that setup.

    Now i have single server with a site (mywebsite.com) setup for a client. I am still unable to see tab for "documentroot" It only has LinuxUser=web2, LinuxGroup=client2,AppacheDirective=blank...


    My problem still unsolved, i don't see website default page instead it shows me my wireless router's control panel which is 192.168.1.1 any ideas?

    What other post you are referring to ?


    Thanx
     
  6. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ifconfig
    ?
     
  7. khan

    khan New Member

    >>># ifconfig -a
    eth0 Link encap:Ethernet HWaddr 00:0e:0c:6a:a7:b6
    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:16

    eth1 Link encap:Ethernet HWaddr 00:0e:0c:6a:a7:b7
    inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::20e:cff:fe6a:a7b7/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:18261 errors:0 dropped:0 overruns:0 frame:0
    TX packets:10168 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:21938200 (21.9 MB) TX bytes:7228576 (7.2 MB)

    eth0:avahi Link encap:Ethernet HWaddr 00:0e:0c:6a:a7:b6
    inet addr:169.999.999.999 Bcast:169.999.255.255 Mask:255.255.0.0
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    Interrupt:16

    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:244 errors:0 dropped:0 overruns:0 frame:0
    TX packets:244 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:23697 (23.6 KB) TX bytes:23697 (23.6 KB)

    pan0 Link encap:Ethernet HWaddr 2e:83:80:9c:f1:3d
    inet6 addr: fe80::2c83:80ff:fe9c:f13d/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 B) TX bytes:6341 (6.3 KB)

    pan0:avahi Link encap:Ethernet HWaddr 2e:83:80:9c:f1:3d
    inet addr:169.999.999.999 Bcast:169.999.255.255 Mask:255.255.0.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

    virbr0 Link encap:Ethernet HWaddr 7a:2d:7a:0f:c7:09
    inet6 addr: fe80::782d:7aff:fe0f:c709/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 B) TX bytes:10013 (10.0 KB)

    virbr0:avahi Link encap:Ethernet HWaddr 7a:2d:7a:0f:c7:09
    inet addr:169.999.9.999 Bcast:169.999.999.999 Mask:255.255.0.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1



    >>># dhclient
    Internet Systems Consortium DHCP Client V3.1.1
    Copyright 2004-2008 Internet Systems Consortium.
    All rights reserved.
    For info, please visit http://www.isc.org/sw/dhcp/

    Listening on LPF/pan0/2e:83:80:9c:f1:3d
    Sending on LPF/pan0/2e:83:80:9c:f1:3d
    Listening on LPF/eth0/00:0e:0c:6a:a7:b6
    Sending on LPF/eth0/00:0e:0c:6a:a7:b6
    Listening on LPF/virbr0/7a:2d:7a:0f:c7:09
    Sending on LPF/virbr0/7a:2d:7a:0f:c7:09
    Listening on LPF/eth1/00:0e:0c:6a:a7:b7
    Sending on LPF/eth1/00:0e:0c:6a:a7:b7
    Sending on Socket/fallback
    DHCPDISCOVER on virbr0 to 255.255.255.255 port 67 interval 3
    DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
    DHCPDISCOVER on pan0 to 255.255.255.255 port 67 interval 6
    DHCPDISCOVER on virbr0 to 255.255.255.255 port 67 interval 6
    DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6
    DHCPOFFER of 192.168.1.105 from 192.168.1.1
    DHCPREQUEST of 192.168.1.105 on eth1 to 255.255.255.255 port 67
    DHCPACK of 192.168.1.105 from 192.168.1.1
    bound to 192.168.1.105 -- renewal in 286868 seconds.


    >>># cat /etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    auto eth1
    ###iface eth1 inet dhcp
    iface eth1 inet static
    address 192.168.1.105
    netmask 255.255.255.0
    network 192.168.1.1
    broadcast 192.168.0.255
    gateway 192.168.1.1


    >>> # route -n
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    169.999.0.0 0.0.0.0 255.255.0.0 U 0 0 0 virbr0
    169.999.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
    169.999.0.0 0.0.0.0 255.255.0.0 U 0 0 0 pan0
    0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
    0.0.0.0 0.0.0.0 0.0.0.0 U 1000 0 0 virbr0


    >>># cat /etc/resolv.conf
    nameserver 192.168.1.1


    www.server1.com configuration is as follows:

    [global]
    webserver=apache
    mailserver=postfix
    dnsserver=mydns

    [server]
    auto_network_configuration=
    ip_address=127.0.0.1
    netmask=255.255.255.0
    gateway=192.168.0.1
    hostname=server1.com
    nameservers=192.168.0.1,192.168.0.2

    [mail]
    module=postfix_mysql
    maildir_path=/var/vmail/[domain]/[localpart]
    homedir_path=/var/vmail
    mailuser_uid=5000
    mailuser_gid=5000
    mailuser_name=vmail
    mailuser_group=vmail
    relayhost=
    relayhost_user=
    relayhost_password=
    mailbox_size_limit=0
    message_size_limit=0

    [getmail]
    getmail_config_dir=/etc/getmail

    [web]
    website_basedir=/var/www
    website_path=/var/www/clients/client[client_id]/web[website_id]
    website_symlinks=/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/
    vhost_conf_dir=/etc/apache2/sites-available
    vhost_conf_enabled_dir=/etc/apache2/sites-enabled

    [fastcgi]
    fastcgi_starter_path=/var/www/php-fcgi-scripts/[system_user]/
    fastcgi_starter_script=.php-fcgi-starter
    fastcgi_alias=/php/
    fastcgi_phpini_path=/etc/php5/cgi/
    fastcgi_children=8
    fastcgi_max_requests=5000
    fastcgi_bin=/usr/bin/php-cgi

    [jailkit]
    jailkit_chroot_home=/home/[username]
    jailkit_chroot_app_sections=basicshell editors extendedshell netutils ssh sftp scp groups jk_lsh
    jailkit_chroot_app_programs=/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico


    Thanks for your prompt response Falko...

    Note: When i try to access www.website1.com from outside network it gives me "connection time out" error...
     
    Last edited: Jul 20, 2009
  8. falko

    falko Super Moderator Howtoforge Staff

    The server has the IP 192.168.1.105, not 192.168.1.1. 192.168.1.1 is your router.
     
  9. khan

    khan New Member

    Falko,
    Could you please be specific, which file and which value is wrong, I have "resolv.conf" with nameserver 192.168.1.1 since i'm using GoDaddy to resolve all external DNS. My hosts file has ip address for each host as follows:

    127.0.0.1 server1.com localhost.localdomain localhost
    127.0.1.1 server1
    # Additional lines for server
    192.168.1.105 website1.com
    192.168.1.105 website2.net
    192.168.1.105 website3.com
    192.168.1.105 website4.net

    # The following lines are desirable for IPv6 capable hosts
    ::1 localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts

    Please point me in right direction, which file needed changes and what values, as i mentioned before I'm rookie thus I didn't undrestand what exactly you mean...

    Thanks for your help...
     
    Last edited: Jul 22, 2009
  10. falko

    falko Super Moderator Howtoforge Staff

    You must configure your router to forward the ports 80 and 8080 to 192.168.1.105.
     
  11. khan

    khan New Member

    Thanks Falko for your prompt response.

    I do have router configured to IP 192.168.1.105 for ports 80 and 8080

    I still cant access website any idea why?

    I still don't have an answer to one of my earlier question...
    "Why am I still unable to see tab for "documentroot" It only has LinuxUser=web2, LinuxGroup=client2, AppacheDirective=blank... ?"

    Please help...
     
  12. falko

    falko Super Moderator Howtoforge Staff

    Do your domains/FQDNs point to your router's public IP?
     
  13. khan

    khan New Member

    I resolved the first issue :)

    Falko,

    Answer to your question is Yes!!!

    The problem was not any of this but it was my hosts file; which was as follows:

    127.0.0.1 server1.com localhost.localdomain localhost
    127.0.1.1 server1
    # Additional lines for server
    192.168.1.105 website1.com
    192.168.1.105 website2.net
    192.168.1.105 website3.com
    192.168.1.105 website4.net

    While I had to add www in front of website names as follows:

    127.0.0.1 server1.com localhost.localdomain localhost
    127.0.1.1 server1
    # Additional lines for server
    192.168.1.105 www.website1.com
    192.168.1.105 www.website2.net
    192.168.1.105 www.website3.com
    192.168.1.105 www.website4.net

    Even-though I had Auto-subdomain selected as www but still it doesn't see it (beats me why, may be its ubuntu 9.04 issue)
    Thank you all for your responses and precious time...
     
    Last edited: Jul 23, 2009

Share This Page