I want to setup cakePHP on my apache
my apache.conf file
<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>
But instead of loading the index.php under the webroot it calls the index.php under /var/www/html/ ... What am I doing wrong?
My tail 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"
my tail 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'
Always remember to do a sudo a2ensite my_vhost.conf
Hope that helps someone ,too.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.