<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName cscms.org
ServerAlias www.cscms.org
DocumentRoot /web/cscms.org/www
<Directory /web/cscms.org/www>
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog /web/cscms.org/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel info
#CustomLog /web/cscms.org/access.log combined
</VirtualHost>
DirectoryIndex default.php
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} (.*)
RewriteCond %{REQUEST_URI} /$ [NC]
RewriteRule ^(.*)(/)$ $1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9_-]+)$ default.php?url=$1 [L,QSA]
RewriteRule ^([a-zA-Z0-9_-]+)/$ default.php?url=$1 [L,QSA]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ default.php?url=$1&type=$2
<?php
echo 'Hello, world!';
[Sat Sep 12 19:10:43.744595 2015] [:error] [pid 6526] [client 127.0.0.1:48880] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
[Sat Sep 12 19:10:43.744624 2015] [:error] [pid 6526] [client 127.0.0.1:48880] PHP Fatal error: Unknown: Failed opening required '/var/www/html/default.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0
drwxr-xr-x 23 root root 4096 Сен 11 21:57 .
drwxr-xr-x 23 root root 4096 Сен 11 21:57 ..
drwxr-xr-x 2 root root 4096 Сен 11 21:59 bin
drwxr-xr-x 4 root root 4096 Сен 11 21:59 boot
drwxrwxr-x 2 root root 4096 Сен 11 21:55 cdrom
drwxr-xr-x 18 root root 4240 Сен 12 18:03 dev
drwxr-xr-x 131 root root 12288 Сен 12 18:03 etc
drwxr-xr-x 3 root root 4096 Сен 11 21:57 home
lrwxrwxrwx 1 root root 33 Сен 11 21:57 initrd.img -> boot/initrd.img-3.16.0-34-generic
drwxr-xr-x 23 root root 4096 Сен 11 21:59 lib
drwxr-xr-x 2 root root 4096 Апр 11 18:16 lib64
drwx------ 2 root root 16384 Сен 11 21:53 lost+found
drwxr-xr-x 3 root root 4096 Сен 11 22:18 media
drwxr-xr-x 2 root root 4096 Апр 11 2014 mnt
drwxr-xr-x 4 root root 4096 Сен 11 22:14 opt
dr-xr-xr-x 237 root root 0 Сен 12 18:03 proc
drwx------ 2 root root 4096 Апр 11 18:25 root
drwxr-xr-x 25 root root 800 Сен 12 18:18 run
drwxr-xr-x 2 root root 12288 Сен 11 22:03 sbin
drwxr-xr-x 3 root root 4096 Сен 12 01:54 srv
dr-xr-xr-x 13 root root 0 Сен 12 18:03 sys
drwxrwxrwt 6 root root 4096 Сен 12 19:08 tmp
drwxr-xr-x 10 root root 4096 Мар 31 20:11 usr
drwxr-xr-x 14 root root 4096 Сен 11 22:22 var
lrwxrwxrwx 1 root root 30 Сен 11 21:57 vmlinuz -> boot/vmlinuz-3.16.0-34-generic
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName ft.dev
ServerAlias www.ft.dev
DocumentRoot /var/www/html
<Directory /var/www/html>
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride All
Require all granted
</Directory>
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel info
</VirtualHost>
total 36
drwxrwxrwx 7 root root 4096 Сен 12 01:05 .
drwxr-xr-x 3 root root 4096 Сен 11 22:22 ..
drwx------ 2 alex alex 4096 Сен 10 23:40 css
-rw------- 1 alex alex 27 Сен 12 19:10 default.php
-rw-rw-r-- 1 alex alex 428 Сен 12 19:02 .htaccess
drwx------ 2 alex alex 4096 Сен 11 16:45 img
drwx------ 4 alex alex 4096 Сен 11 16:55 inc
drwx------ 2 alex alex 4096 Сен 11 00:51 js
drwx------ 3 alex alex 4096 Сен 10 23:33 libs