Configurare BIND si virtual hosts in Webmin

Instalare CentOS7 cu Apache, PHP, MySQL si vsftpd, administrare prin Webmin, configurarea zonelor/domeniilor in BIND, apoi configurarea virtual host pentru Apache.

  1. Instalare CentOS 7 – Minimal Install
    Detalii instalare aici
    Actualizare software


    Instalare Apache (httpd) si pornire serviciu

    //start service

    //Enable Apache to automatically run every time your server reboot

    Instalare PHP

    //restart Apache

    Acum se poate rula un fisier php pentru comanda phpinfo().

    Instalare Maria-DB (mysql)

    //start

    //enable on system boot

    //check status

    //pentru setarea parolei si alte configurari de securitate

    Instalare phpMyAdmin
    //download the rpm file

    //enable the repository and delete the .rpm file as it is not needed again

    //restart Apache

     

  2. Instalare Webmin
    //first, create a new file webmin.repo in /etc/yum.repos.d/

    //paste below

    //install webmin GPG key using below command.

    //update the repositorys

    //install webmin

    //Start the service and make it start automatically

    //change the port to 10005

    //“port=10005” and save

    Instalare VSFTPD

    //configurare vsftpd

    Disallow anonymous, unidentified users to access files via FTP; change the anonymous_enable setting to NO:

    Allow local uses to login by changing the local_enable setting to YES:

    If you want local user to be able to write to a directory, then change the write_enable setting to YES:

    Local users will be ‘chroot jailed’ and they will be denied access to any other part of the server; change the chroot_local_user setting to YES:

    Pornire serviciu vsftpd si configurare pentru pornire serviciu la pornirea sistemului

    //Add vsftpd module to Webmin
    Download https://provider4u.de/images/downloads/vsftpd.tar.gz
    Log into Webmin
    Webmin Configuration > press the Webmin Modules button > Upload the file
    In Servers > Vsftpd configure the Module
    Change path from /etc/vsftpd.conf to /etc/vsftpd/vsftpd.conf
    Save

    Add to end of vsftpd.conf:


    //Add a ftp_user and ftp_user_password to Linux with primary group FTP and subgroup Apache
    (se poate crea din Webmin)
  3. Configurare BIND
    Un-used Modules > BIND DNS Server
    Click pentru instalare modul
    Servers > BIND DNS Server > Create Master Zone
    Zone Type: Forward
    Domain Name: lorand.ro
    Email address: contact@lorand.ro
    Use zone template: No
    Add reverses for template addresses? Yes
    Edit Master Zone
    Add Address Record
    Name: ns1.lorand.ro
    Address: 192.168.2.73
    Add Nameserver
    Zone name: lorand.ro.
    Name server: ns1.lorand.ro.
  4. Creare user pentru domeniu
    adduser lorandro
    passwd lorandro
    mkdir -p /home/lorandro/htdocs
    chown -R lorandro /home/lorandro
    chmod o+x /home/lorandro
    (utilizatorul astfel creat se va putea autentifica si prin FTP, cu acces doar la folderul lui: /home/lorandro) 
  5. Configurare Apache virtual host
    Server > Apache Webserver > Create virtual host
    Any address
    Port default
    Document root: /home/lorandro/htdocs
    Server name: lorand.ro
    Dupa creare, click pe Virtual host-ul creat > Network and Addresses
    Alternate virtual server names: *.lorand.ro
    Apply configuration (or restart Apache service)

Leave a Reply

Your email address will not be published. Required fields are marked *