I’ve some issues with my configuration. I’m using Nginx as a reversed proxy for my Apache server. My website has .htaccess authentication but Nginx doesn’t seem to understand it so I’m getting a 404 error.
I saw some translators on other answers but it doesn’t translate this part.
AuthUserFile /var/www/mywebsite/private/.htpassword
AuthName "Acces Restreint"
AuthType Basic
Require valid-user
By the way, do you have any idea about how to translate this second part ?
php_value session.gc_maxlifetime 604800
SetEnv APPLICATION_ENV development
Thanks everyone for your help !
for perfomance related issues, nginx by default does not look up per-directory .htaccess files, which is a problem if your hosting does not let you edit webserver config.
if you can edit webserver config (or put new config into conf.d dir)
just add these lines, replacing /your/path correspondingly
answering second part of your question needs more info on how you use PHP with nginx.
if you are tied to FastCGI (e.g. php-fpm), then you can use this method to set PHP’ vars: