We tried /etc/security/limits.conf, but that seems to have no effect.
The used line for limits.conf looks as follows:
myuser hard nproc 6
That is configuration for a server. I want to limit the processes started. Ulimit limits the processes started from the shell (if I understand that right). But in my case apache starts mapserver-processes, and that number have to be limited.