• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question HostnameLookups

moswak

Regular Pleskian
Hi,

centos 7/ Plesk 12.5 apache/nginx

i want to allow access only for some providers and my htaccess on an only apacheserver works fine like

Order deny,allow
Deny from all
Allow from .t-ipconnect.de

but on the pleskserver this doesnt work.

I set in the Additional Apache directives for the domain:
HostnameLookups On

but this doesnt help. where is my error ?


 
You have both apache/nginx running.
So initially all requests go to nginx and if its static content, it just delivers it.

You have two choices. Either disable nginx and your .htaccess file will just work (since you would only be using apache).

Or if you want any of the benefits of also using nginx (I won't get into that flame war), then you can write your rules to work with nginx, or find another way to do what you want with nginx.
Look at their explanation about .htaccess: https://www.nginx.com/resources/wiki/start/topics/examples/likeapache-htaccess/#

If you want to rewrite your .htaccess rules for nginix, see http://www.anilcetin.com/convert-apache-htaccess-to-nginx/
it covers much of it, but not 100% accurate.
 
When i disable nginx (disable Smart static files processing "If turned off, Apache will process all requests for static files. nginx will only pass requests and responses without modification. Turn off this option only for troubleshooting") the .htaccess doesnt work :-(

or is there another way to disable nginx just for one domain ?
 
Back
Top