zone "sieci.pb" { type master; file "/etc/bind/db.sieci.pb"; }; zone "100.168.192.in-addr.arpa" { type master; file "/etc/bind/db.100"; }; $TTL 604800 @ IN SOA sieci.pb. root.sieci.pb. ( 3 604800 86400 2419200 604800 ) @ IN NS ns.sieci.pb. @ IN NS ns2.sieci.pb. ; Adresy Serwera @ IN A 192.168.100.10 ns IN A 192.168.100.10 ns2 IN A 192.168.100.11 www IN A 192.168.100.10 ; Adresy dla VirtualHostow (Name-Based) strona1 IN A 192.168.100.10 strona2 IN A 192.168.100.10 ; Adresy dla VirtualHostow (IP-Based) ip1 IN A 192.168.100.10 ip2 IN A 192.168.100.11 $TTL 604800 @ IN SOA sieci.pb. root.sieci.pb. ( 1 604800 86400 2419200 604800 ) @ IN NS ns.sieci.pb. 10 IN PTR www.sieci.pb. 11 IN PTR ip2.sieci.pb. # 1. GŁÓWNA STRONA + HASŁA + USERDIR ServerName www.sieci.pb DocumentRoot /var/www/html # Katalog chroniony hasłem (/tajne) Alias "/tajne" "/var/www/html/tajne" AuthType Basic AuthName "Tajne Admina" AuthUserFile /etc/apache2/.htpasswd Require valid-user # Katalog Studenta chroniony hasłem (~student/tajne) AuthType Basic AuthName "Tajne Studenta" AuthUserFile /etc/apache2/.htpasswd Require valid-user # 2. SSL (HTTPS) ServerName www.sieci.pb DocumentRoot /var/www/html SSLEngine on SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key # 3. NAME-BASED (Dwie różne nazwy na tym samym IP) ServerName strona1.sieci.pb DocumentRoot /var/www/html/strona1 ServerName strona2.sieci.pb DocumentRoot /var/www/html/strona2 # 4. IP-BASED (Dwa różne IP) # Strona na IP końcówka .10 ServerName ip1.sieci.pb DocumentRoot /var/www/html/ip1 # Strona na IP końcówka .11 ServerName ip2.sieci.pb DocumentRoot /var/www/html/ip2 smbpasswd -a student [public] path = /srv/samba/public comment = Katalog Publiczny browseable = yes read only = no guest ok = yes create mask = 0777 directory mask = 0777 [private] path = /srv/samba/private comment = Katalog Prywatny Studenta browseable = yes read only = no guest ok = no valid users = student