My site loads perfectly fine when I have devMode set to true, but when I keep everything the same except turning devMode to false, it returns a 500 error (probably a server issue). I am really at a loss and not sure how to move on. I am new to craft, there are a lot of plugins if that matters.

This is my environment setup, if I keep everything the same here but change devMode to false I get a 500 Internal server error.

    'dev' => [
        // Dev Mode (see https://craftcms.com/guides/what-dev-mode-does)
        'devMode' => true,
        'baseCpUrl' => getenv('BASE_CP_URL'),
        'requireMatchingUserAgentForSession' => false,

This is my craftcms.local.conf

<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.
        #ServerName www.example.com
        ServerName mysite.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/mysite.com/current/vendor/craftcms/cms/src/app/web

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

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

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
        <Directory /var/www/html/mysite.com/current/vendor/craftcms/cms/src/app/web>
                 Options Indexes FollowSymLinks MultiViews
                 AllowOverride ALL
                 Require all granted


and my .htcaccess file

php_value max_input_vars 2000
php_value upload_max_filesize 100M
php_value post_max_size 20M

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Send would-be 404 requests to Craft
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
    RewriteRule (.+) index.php?p=$1 [QSA,L]

  • 1
    Have you checked your error logs? Specifically, storage/logs/phperrors.log could provide a clue. Commented May 23 at 21:20
  • 1
    Yeah this is where all the logs were hiding, looks like its the same redis password issue I came across while searching the bug. - Thank you!
    – Mandy
    Commented May 23 at 22:05
  • 1
    In case this helps someone else - github.com/craftcms/cms/issues/7617
    – Mandy
    Commented May 23 at 22:06


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.