No route found for POST api/token

Discussions about CSEntry
Post Reply
Webexplr
Posts: 8
Joined: June 12th, 2023, 4:08 am

No route found for POST api/token

Post by Webexplr »

After successfully setting up CSWeb, I got this error when trying to login to CSWeb as admin:
Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "POST /csweb7/api/token"" at /var/www/html/csweb7/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php line 136
Problem is, the string "csweb7" does not exist anywhere in the code and Apache config but this one config file:
<VirtualHost *:8080>
ServerName pusjakuk.ddns.net
DocumentRoot /var/www/html/csweb7

<Directory /var/www/html/csweb7>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/pusjakuk.error
CustomLog ${APACHE_LOG_DIR}/pusjakuk.access combined
</VirtualHost>
Any idea what caused the error? This is the first time I use Apache for web server, previously I only used nginx for my other projects.

Btw, my csweb instance should be accessible by this URL pusjakuk.ddns.net, and not pusjakuk.ddns.net/csweb7
Webexplr
Posts: 8
Joined: June 12th, 2023, 4:08 am

Re: No route found for POST api/token

Post by Webexplr »

FIXED by clearing the f*cking cache whatever it is:

Code: Select all

sudo php /path/to/bin/console cache:clear --env=dev
Post Reply