Friday, July 14, 2017

Hidden nginx rewrite rule (I think)



About a week ago, I was playing with nginx rewrite stuff to rewrite /admin to https.




I now want to undo this, but I cannot for the life of me, remember where I put that rewrite rule.



I've reloaded, restarted, stopped and started nginx. I've rebooted the server. I've restored nginx.conf to the default version.



I have no idea where I put that rule. It's either there, or nginx is just confused, because when I go to [domain]/admin, it redirects to https://[domain]/admin



I might end up purging nginx from the system and installing from scratch.



Is there anywhere else that a rewrite might be put?

Any suggestions?



Thanks.


Answer



Perhaps you could provide your actual configuration file? You want to look for the include directive as that's the only way any directive can be "hidden".



Of course, far more likely is that your browser is caching and you've actually already removed the rewrite. Try to test the URL with curl and see if a location header is present, if not then it's browser caching.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...