Instalare Ubuntu 16
Actualizare distributie Linux
- sudo apt update
- sudo apt -y upgrade
Instalare pachet de aplicatii mc (manager fisiere)
Instalare pachet aplicatii server web
- server web (apache)
- sudo apt install apache2
- sudo service apache2 restart
Accesare http://localhost
Modificare site implicit
- sudo mcedit /var/www/html/index.html
- un exemplu care arată aşa
Adaugare pachet documentatie
Securizare site web
- Documentatie:
- AllowOverride AuthConfig
- htpasswd
- .htaccess
- Modificare directiva AllowOverride in fisierul de configurare al servciului web, /etc/apache2/apache2.conf
- Creare fisier de autentificare, cu utilitarul htpasswd, de ex:.: htpasswd -c /etc/apache2/passfile numeUser
- Creare fisier cu reguli de autentificare (.htaccess) in directorul web securizat
- sudo mkdir /var/www/html/secure
- sudo mcedit /var/www/html/secure/index.html
- sudo mcedit /var/www/html/secure/.htaccess
AuthType Basic
AuthName "Restricted Files"
# (Following line optional)
AuthBasicProvider file
AuthUserFile "/etc/apache2/passfile"
Require user numeUser
Repornire serviciu
- sudo service apache2 restart
Accesare din browser http://localhost/secure