Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I know that Nginx does not support .htaccess files, but if you used Nginx as a reverse proxy (is that the correct term, Nginx handles static, Apache handles dynamic) with Apache, would you be able to use .htaccess files then?

share|improve this question

1 Answer 1

If you use Nginx as a reverse proxy to Apache, then Nginx is "passing along" requests to Apache on behalf of the end client and delivering the responses back to the client. Think of it as a man-in-the-middle sort of situation (because it is).

If you configure Nginx to serve static files, then it will do just that... whether or not you have any "wishful thinking" rules in the ht-access file. It doesn't know anything about ht-access, Apache does. On the other hand, for any requests that Nginx passes on to Apache, well... Apache is going to act like it always does.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.