2017-02-14 19 views
0

Я хочу установки CakePHP на моем апачаCakePHP 2,6 виртуального хоста apache2 Linux

мой apache.conf файл

<VirtualHost *:80> 
     ServerName campusjaeger.dev 
     ServerAlias campusjaeger.dev 
     DocumentRoot /home/insasse/campusjaeger/cakephp/app/webroot 
     AccessFileName .htlocal .htdefault .htaccess 
     <Directory "/home/insasse/campusjaeger/cakephp/app/webroot"> 
       Options FollowSymLinks 
       AllowOverride All 
       Require all granted 
     </Directory> 
</VirtualHost> 

Но вместо загрузки index.php под вебсервера он вызывает index.php under/var/www/html/... Что я делаю неправильно?

Мой хвост access.log

127.0.0.1 - - [14/Feb/2017:14:21:57 +0100] "GET /favicon.ico HTTP/1.1" 404 507 "http://campusjaeger.dev/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36" 
127.0.0.1 - - [14/Feb/2017:14:21:58 +0100] "GET/HTTP/1.1" 200 3524 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36" 
127.0.0.1 - - [14/Feb/2017:14:21:58 +0100] "GET /icons/ubuntu-logo.png HTTP/1.1" 200 3623 "http://campusjaeger.dev/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36" 
127.0.0.1 - - [14/Feb/2017:14:21:58 +0100] "GET /favicon.ico HTTP/1.1" 404 507 "http://campusjaeger.dev/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36" 
127.0.0.1 - - [14/Feb/2017:14:21:58 +0100] "GET/HTTP/1.1" 200 3524 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36" 
127.0.0.1 - - [14/Feb/2017:14:21:58 +0100] "GET /icons/ubuntu-logo.png HTTP/1.1" 200 3623 "http://campusjaeger.dev/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36" 
127.0.0.1 - - [14/Feb/2017:14:21:58 +0100] "GET /favicon.ico HTTP/1.1" 404 507 "http://campusjaeger.dev/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36" 
127.0.0.1 - - [14/Feb/2017:14:21:58 +0100] "GET/HTTP/1.1" 200 3524 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36" 
127.0.0.1 - - [14/Feb/2017:14:21:58 +0100] "GET /icons/ubuntu-logo.png HTTP/1.1" 200 3623 "http://campusjaeger.dev/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36" 
127.0.0.1 - - [14/Feb/2017:14:21:58 +0100] "GET /favicon.ico HTTP/1.1" 404 507 "http://campusjaeger.dev/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36" 

мой хвост error.log

[Tue Feb 14 14:10:08.333823 2017] [mpm_prefork:notice] [pid 16084] AH00169: caught SIGTERM, shutting down 
[Tue Feb 14 14:10:09.501924 2017] [mpm_prefork:notice] [pid 16577] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations 
[Tue Feb 14 14:10:09.501989 2017] [core:notice] [pid 16577] AH00094: Command line: '/usr/sbin/apache2' 
[Tue Feb 14 14:17:21.337819 2017] [mpm_prefork:notice] [pid 16577] AH00169: caught SIGTERM, shutting down 
[Tue Feb 14 14:17:22.476980 2017] [mpm_prefork:notice] [pid 17035] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations 
[Tue Feb 14 14:17:22.477040 2017] [core:notice] [pid 17035] AH00094: Command line: '/usr/sbin/apache2' 
[Tue Feb 14 14:19:38.505825 2017] [mpm_prefork:notice] [pid 17035] AH00169: caught SIGTERM, shutting down 
[Tue Feb 14 14:19:39.648414 2017] [mpm_prefork:notice] [pid 17248] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations 
[Tue Feb 14 14:19:39.648478 2017] [core:notice] [pid 17248] AH00094: Command line: '/usr/sbin/apache2' 
+0

У вас нет настроенного 'ServerName'. Скорее всего, сервер по умолчанию отвечает, а не тот виртуальный. – arkascha

+0

спасибо, добавил имя сервера, но все равно никакой разницы, и я сделал перезагрузку. – Insasse

+0

Итак, какой URL-адрес запроса вы пытаетесь? – arkascha

ответ

0

Всегда помните, чтобы сделать sudo a2ensite my_vhost.conf

Надежда, что помогает кому-то, тоже.

 Смежные вопросы

  • Нет связанных вопросов^_^