Saturday, July 9, 2016

nginx - host blog.domain.com from /myapp/public/blog and prevent access from my app.com/blog/*?

Having a server setup like below. I would like to restrict anyone from accessing http://myapp.com/blog/index.html which would route to /public/blog/index.html. Is this possible or should I really store the blog folder outside public? ( Which I don't want )



server {
listen 80;
server_name
myapp.*


root /srv/myapp/current/public;

}

server {
listen 80;
server_name
blog.myapp.*

root /srv/myapp/current/public/blog;


}

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...