Fluentd multiple source to multiple index

Hi, i’m new with fluentd and i have a issue about i can’t figure out.
I have different log file in the same directory source and i want to send each log to a different index on elasticsearch. here an example:

source: /var/log/container/
file1: my-app1.log
file2: my-app2.log
file3: my-app3.log
output:1 index_myapp1
output2: index_myapp2
output3: index_myapp3

i tried to make diffent config file for each app but it seems to read only the last one config.
How can i do this?
thanks for the help