On Fri, Nov 21, 2008 at 10:34:44AM -0600, Joe S. wrote:
To send PHP over to be parsed by php-fpm , but the problem is,
DOCUMENT_ROOT variable isn’t being sent to PHP it keeps saying:
_SERVER[“DOCUMENT_ROOT”] /usr/local/nginx/html
Any specific reason why its doing this?
Any specific reason why it should do something else? You pass
$document_root variable, and in config snipped you provided
nothing defines root to something else.
how to forbid using ip to visite my website thanks
Perhaps you need to explain a little more clearly what you mean, because
you have had two different types of answer, depending on the
interpretation of the question:
I assumed you meant how to ban certain IP addresses from accessing
your website
Others assumed you meant how to prevent someone attempting to access
your website using the IP address instead of the hostname
On Sat, Nov 22, 2008 at 01:29:09PM -0500, Calomel wrote:
One way is with an “if” statement.
Only requests to our Host are allowed
if ($host !~ ^(mydomain\.com|www\.mydomain\.com)$) {
return 444;
}
No, this is the worst way.
The right one is:
server {
server_name _; #default
return 444;
}
server {
server_name mydomain.com
www.mydomain.com
# you may also
1.1.1.1 # allow IP-address
"" # allow access without "Host" header,