1
votes

Good morning,

I’m currently using Cakephp 3 version to develop an application. It should be online on an Ubuntu server and through the subdomain: http://etraining.minmap.cm

To do this, I configured a virtualHost, with the content :

<VirtualHost *:80>
    ServerName etraining.minmap.cm
    ServerAlias www.etraining.minmap.cm
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/etraining.minmap.cm/public_html/webroot
    
    <Directory /var/www/etraining.minmap.cm/public_html/webroot>
        Options -Indexes +FollowSymLinks +MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

The content of the .htaccess located at the application folder is:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule    ^(\.well-known/.*)$ $1 [L]
    RewriteRule    ^$    webroot/    [L]
    RewriteRule    (.*) webroot/$1    [L]
</IfModule>

The content of the .htaccess located at webroot directory is:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

I have followed all the configuration steps outlined in the official documentation. mod_rewrite is enabled, mbstring and intl extensions are also enabled

But, I have 500 Internal Server Error:

500 Internal Server Error

This is the error reported in my Apache error.log:

Apache error

I don’t know if I misconfigured Apache, my .htaccess files, and/or the config/app.php?

2
Please do a search for the error found in the apache logs, this is a very popular problem: google.com/…. Also to get more details enable LogLevel debug as the message suggests. - ndm
The most important bit of information in your question and you've linked to an externally hosted image - why not simply copy/paste the error into your question? - MrWhite
"The content of the .htaccess located at the application folder is:" - Where's the "application folder"? This doesn't seem necessary, given the vHost config you posted? - MrWhite

2 Answers

0
votes

You should enable apache re-write module. It will work

  1. "sudo a2enmod rewrite"
  2. "sudo service apache2 restart"
0
votes

Update .htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>