NGINX plugin Web Server not interpreting PHP file

Started by LeXavLima, May 19, 2021, 07:49:14 AM

Previous topic - Next topic
Hello,
I'm trying to have a php file served on my opnsense box. So I have installed the nginx plugin in order to have a webserver (to NOT use the web server of the GUI)

My problem is that PHP files are served as downloadable files. The php code is not interpreted by the server.
Should the parameter "Pass Request To Local PHP Interpreter / Threat Upstream As FastCGI" be set to TRUE?

And what about the parameter "(PHP) Router Script" ? Does it need to be filled?

I have followed the documentation on "https://docs.opnsense.org/manual/how-tos/nginx_hosting.html?highlight=web%20server" but the php is still not interpreted... Any idea?

Problem solved: It was a misconfiguration.
The value of the field URL Pattern had to be \.php$

Router Script is a special case where every request should be handled by that script instead of selecting the entry point by the URL. This may make sense for some MVC dispatchers but it is not the common case.

Thanks for your answer Fabian.
I still have a problem... I don't want to cross post so I put the link of the question posted on github:
https://github.com/opnsense/plugins/issues/2397

I you have an idea....