Nginx + Php configuration using Foreman

Hello everyone,
I am quite new to puppet and foreman, so excuse my noobiness.
I am trying to configure foreman to install php and nginx on my host.
I’ve managed to install php and nginx modules and install them on the host using classes.
My question is what is the proper way to configure these modules ?
I am trying to configure them using smart class parameters, but it seems very confusing.
For example, what is the correct parameter to set fastcgi_pass for nginx ? I tried nginx_locations, but it threw an error.
I want to learn to use the best practices in foreman.
I would appreciate it if you pointed me in the right direction.