Install cakephp v3 on digitalocean ubuntu 14.04 droplet

November 11, 2015 924 views
PHP PHP Frameworks Ubuntu

I followed the instructions on

It is meant for ubuntu 12.04 and cakephp ver2.x. There were some differences. /etc/apache2/sites-available/default does not exist. Instead, I use /etc/apache2/apache2.conf.

Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all

After making the changes, I get Server Error on the cakephp webpage.

I am using ubuntu 14.04 and cakephp ver3.x

Are there specific instructions for ubuntu 14.04 and cakephp ver3.x? Perhaps the instructions for 12.04 is obsolete. Has anyone succeeded?

The output of apachectl configtest is as follows;

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using Set the 'ServerName' directive globally to suppress this message Syntax OK
1 Answer

'Could not reliably determine the server'
is because you have'nt named your server within the apache conf file. Its not causing the issue though.

I define mine in 000-default (which is the default initial vhost file in sites-available, guess that changed after ubuntu 12). Cake 3 on 15.04 is running sweet this is what I have in my vhost.conf - I set the docroot to the app webroot dir for less rewrite, greater simplicty I would try to get 2.8 working first.

When using cake3 use composer. (sorry for the horrid formatting here)

<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.

    DocumentRoot /var/www/

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /var/www/>
            DirectoryIndex index.php index.html
            Options Indexes FollowSymLinks Multiviews
            AllowOverride All
            Order allow,deny
            allow from all


# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Have another answer? Share your knowledge.