S
S
Shing2015-12-13 14:51:46
linux
Shing, 2015-12-13 14:51:46

Why doesn't htaccess allow IP work on a server with nginx?

Classic htaccess doesn't work, only SetEnvIf X-Real-IP "XXX.XXX.XXX" allowclient
But! On another server, the classic version works under nginx!
I checked apachectl -M on none of the servers the mod_rpaf module is running.
Both have extract_forwarded_module.
I checked on both, did httpd stop, the static was given, so nginx is running on two servers IMHO.
What is the difference between the two servers?
The only thing that the classic doesn't work on is that it uses fcgid.
At the same time, none of the servers show the results of the script

<?PHP

echo $_SERVER[‘REMOTE_ADDR’];

?>

White screen.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
drc, 2015-12-16
@drc

You have a mess in your head, judging by the question. Apache, by the way, also knows how to distribute statics, and he knew how to do this long before the advent of nginx. And to answer your question, you need to look at the configs of both nginx and apache.

O
Oleg Kleshchuk, 2015-12-24
@xenozauros

1. Nginx has never been able, cannot and will not be able to work with .htaccess files
2. httpd stop is not a fact that will stop your Apache.
3. the essence of the question is not at all clear. try asking it again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question