Answer the question
In order to leave comments, you need to log in
nginx config for postfixadmin?
Hello. There was such a problem, there is postfixadmin on Centos 7 through nginx. I wanted to do this:
make access to the mail.mydomain.ru/postfixadmin/login.php admin only from certain ip, and redirect the rest to
mail.mydomain.ru/postfixadmin/users/login.php. I did it like this:
location /postfixadmin {
root /var/www/html;
index index.php;
if ($accessvar = 0) {
rewrite ^/(.*) mail.mydomain.ru/postfixadmin/users/login.php permanent;
}
}
Everything seems to work as it should, only the CSS styles are in /postfixadmin/css/ and when you try to get them from any ip except $accessvar = 0, it redirects to mail.mydomain.ru/postfixadmin/users/login.php.The page opens, but without styles. How can I fix this config so that it redirects all but accessvar = 0 from /postfixadmin/login.php to /postfixadmin/users/login.php ?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question