I have a Symfony 3 API and I'm trying to register a user but I have an error 500 when executing a POST request (GET request works). It's probably a problem with my Apache configuration because I don't have any errors in my logs files. A var_dump('ok') at the top of my function also give me error 500.
My Apache configuration:
<VirtualHost *:80>
ServerName subscription.api.local
ServerAlias www.subscription.api.local
DocumentRoot /var/www/subscription_backend/web
DirectoryIndex /app.php
<Directory /var/www/subscription_backend/web>
AllowOverride None
Order Allow,Deny
Allow from All
FallbackResource /app.php
</Directory>
<Directory /var/www/subscription_backend>
Options FollowSymlinks
</Directory>
<Directory /var/www/subscription_backend/web/bundles>
FallbackResource disabled
</Directory>
ErrorLog /var/log/subscription-error.log
CustomLog /var/log/subscription-access.log combined
</VirtualHost>
Line added in my hosts file:
127.0.0.1 subscription.api.local www.subscription.api.local
My projet is in ~/Projects/subscription_backend directory and I use a symbolic to /var/www/subscription_backend :
sudo ln -s ~/Projects/subscription_backend /var/www/subscription_backend
Permissions of "~/Projects/subscription_backend directory":

Permissions of "/var/www/subscription_backend directory":
lrwxrwxrwx 1 www-data www-data 55 avril 19 21:45 /var/www/subscription_backend -> /home/khan/Projects/subscription_backend/
What's wrong with my configuration ? Why GET request works but not POST ?
Thx
Finally, i solved the problem.
First,fix permissions https://symfony.com/doc/3.3/setup/file_permissions.html:
cd ~/Projects/subscription_backend
rm -rf var/cache/*
rm -rf var/logs/*
HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data [n]ginx' | grep -v root | head -1 | cut -d\ -f1)
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX var
sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX var
composer install
Then install memcache extension:
sudo apt-get install memcached
sudo apt-get install php-memcached
sudo apt-get install php-memcache
sudo service apache2 restart
Clear cache:
bin/console c:c
bin/console c:c --env=prod