Drupal instalation

tested on: drupal 7, linux mint 17,LAMP
apache install extension
apt install php7.0-gd php7.0-mysql php7.0-common php7.0-xml
copy drupal files to:
cd /var/www/drupal

dont forget to copy .httaccess

- in .htaccess uncoment

# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
RewriteBase /

change ownership for www-data:www-data at /drupal & ../sites

a2enmod rewrite

configure httpd.conf
----------------------------------------------
NameVirtualHost *:80

ServerName www.drupal.com
ServerAlias drupal.com *.drupal.com
DocumentRoot /var/www/drupal

Options +FollowSymLinks
AllowOverride All
order allow,deny
allow from all

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]

----------------------------------------
enable website
a2ensite httpd.conf

update /etc/hosts
add ip and www.drupal.com
192.168.1.2 www.drupal.com drupal.com

create database
- grant access to mysuer
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON mydb.* TO 'myuser'@'localhost' IDENTIFIED BY 'mysecret'

flush privileges;

restart apache2
/etc/init.d/apache2 restart

go browser and begin instalation

Trusted host security setting in Drupal 8

As of January 2015, Drupal 8 supports "trusted host patterns", where you can (and should) specify a set of regular expressions that the domains on incoming requests must match. Example configuration in settings.php would read:

$settings['trusted_host_patterns'] = [
'^www\.example\.com$',
];