Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
21.1 Legacy Series
»
NGINX plugin Web Server not interpreting PHP file
« previous
next »
Print
Pages: [
1
]
Author
Topic: NGINX plugin Web Server not interpreting PHP file (Read 1643 times)
LeXavLima
Newbie
Posts: 3
Karma: 0
NGINX plugin Web Server not interpreting PHP file
«
on:
May 19, 2021, 07:49:14 am »
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?
Logged
LeXavLima
Newbie
Posts: 3
Karma: 0
Re: NGINX plugin Web Server not interpreting PHP file
«
Reply #1 on:
May 20, 2021, 07:31:15 am »
Problem solved: It was a misconfiguration.
The value of the field
URL Pattern
had to be
Code:
[Select]
\.php$
Logged
fabian
Hero Member
Posts: 2769
Karma: 200
OPNsense Contributor (Language, VPN, Proxy, etc.)
Re: NGINX plugin Web Server not interpreting PHP file
«
Reply #2 on:
May 20, 2021, 10:52:03 am »
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.
Logged
LeXavLima
Newbie
Posts: 3
Karma: 0
Re: NGINX plugin Web Server not interpreting PHP file
«
Reply #3 on:
May 20, 2021, 03:31:34 pm »
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....
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
21.1 Legacy Series
»
NGINX plugin Web Server not interpreting PHP file