Error on half the page

Hey, I really need help,

After a clean install and successful install I login and half the page is getting a error
In my error.log have this
[Thu Jan 23 12:28:34.485033 2025] [core:alert] [pid 325336] [client 81.193.103.124:65148] /var/www/crm.dedica.dev/public/legacy/.htaccess: Invalid command ‘RedirectMatch’, perhaps misspelled or defined by a module not included in the server configuration, referer: https://crm.dedica.dev/

I check the .htaccess and everything look fine.

And getting this in my prod.log

[2025-01-23 12:28:23] php.INFO: User Deprecated: Since api-platform/core 2.7: Use “ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface” instead of “ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface”. {“exception”:“[object] (ErrorException(code: 0): User Deprecated: Since api-platform/core 2.7: Use “ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface” instead of “ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface”. at /var/www/crm.dedica.dev/vendor/api-platform/core/src/Symfony/EventListener/DeserializeListener.php:63)”}
[2025-01-23 12:28:23] security.DEBUG: Stored the security token in the session. {“key”:“_security_main”}

Has anybody ever had this problem?

Thank you.

The INFO and DEBUG messages are not your problem.

The error with the RedirectMatch is, and it is probably in your main Apache configuration file such as httpd.conf or apache.conf.

Make sure you have mod_rewrite module installed and enabled, search google for how to do it for your OS/web server.

1 Like

<VirtualHost *:80>
ServerName crm.dedica.dev
DocumentRoot /var/www/crm.dedica.dev/public

<Directory /var/www/crm.dedica.dev/public>
AllowOverride All

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

RewriteEngine on
RewriteCond %{SERVER_NAME} =crm.dedica.dev
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

This is what I have in my virtualhost conf

Solved the problem, it indeed was vhost configurations

Had to add some new lines

<Directory /var/www/project/public>
        AllowOverride None
        Require all granted
        FallbackResource /index.php
    </Directory>

Thanks you for all the help

1 Like