LAN local server

Discussion in 'Installation/Configuration' started by Geko, Feb 3, 2016.

  1. Geko

    Geko New Member

    Hello everyone
    I'm working on a personal project of using a Raspberry Pi 2 with ISPConfig to have an internal DNS server and multiple servers on apache2/nginx.
    My goal is to be able to setup development environments rapidly, creating a new site for each new project and assigning it a domain like projectname.raspy2.lan visible only inside my LAN, with FTP access and MySQL databases.
    I'm using Raspbian Jessie, based on Debian 8, and installed everything according to the perfect server (no email server though) guide. So far BIND9 is working, I changed my router's primary DNS to be my raspberry and I can reach outside internet.
    Since this is a bit outside my knowledge (never worked with DNS, but I know the theory and would like to learn from this; never used multiple-server setups), I'm also concerned with having correct settings, so please help me out on this too. Thanks! ^^

    Problem
    raises when I create a new site: i see the default page of Apache2 from /var/www/html/index.html instead of the one from /var/www/raspy.lan

    ISPConfig Server Config:
    -- Server
    IP: 192.168.1.15
    hostname: raspy2.lan
    [is this ok?] nameservers: 127.0.0.1

    -- Web
    [is this ok?] 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]/
    php open_basedir: [website_path]/web:[website_path]/private:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin

    DNS:
    server: raspy2.lan
    zone: raspy2.lan.
    [is this ok?] ns: raspy2.lan.

    -- Records (auto created)
    A ----- raspy2.lan. ----- 192.168.1.5
    A ----- www ------------ 192.168.1.5
    A ----- mail ------------- 192.168.1.5
    MX --- raspy2.lan. ---- mail.raspy2.lan.
    NS --- raspy2.lan. ---- raspy2.lan.
    NS --- raspy2.lan. ---- raspy2.lan.

    Site:
    domain: raspy2.lan
    php open_basedir: /var/www/clients/client0/web9/web:/var/www/clients/client0/web9/private:/var/www/clients/client0/web9/tmp:/var/www/raspy2.lan/web:/srv/www/raspy2.lan/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin

    Raspberry:
    - /etc/network/interfaces: set as static ip on eth0 (192.168.1.15)
    - /etc/dhcpcd.conf: had to set static ip in this one because of Jessie build bug; if not set it always gets 1 ip from dhcp + 1 ip from static, having 2 ips associated
    - /etc/hosname: raspy2
    - /etc/hosts:
    --- 127.0.0.1 -------- localhost.lan --- localhost
    --- 192.168.1.15 --- raspy2.lan ----- raspy2 # is this ok?
    --- 127.0.0.1 -------- raspy2.lan ----- raspy2 #is this ok?
     

Share This Page