Hey @Alex2222000 welcome to the Nextcloud community and thanks for supporting the snap.
I want to redirect logs from file to syslog
nope I’m afraid that won’t work due to Snap confinement. You will not be able to access any other directory outside of the confinement. see FAQ’s.
to solve your “Internal Server Error” issue, restore your backed up config.php file see How to edit config.php for Nextcloud snap or remove that line you added from your config.php.
nextcloud.occ config:system:delete log_type syslog