Serving an alternate robots.txt for SSL requests.

Juan Fco. Giordana juangiordana at gmail.com
Wed Jan 14 05:55:14 MSK 2009


I actually do the same. The thing is I just don't like that.

I tend to use the exact same configurations on both SSL and non-SSL 
connections to allow users browsing the site in a safe way if they want to.

But duplicate conf seems to lead to problems.

Dave Cheney wrote:
> I prefer to put my vhost definitions in a seperate file so my version of
> this would look something like this
> 
> server {
>     listen 80;
>     include vhost.d/vhost.conf;
> }
> 
> server {
>     listen 443;
>     include ssl.conf;
> 
>     location = /robots.txt { ... }
> 
>     include vhost.d/vhost.conf;
> }
> 
> Cheers
> 
> Dave
> 





More information about the nginx mailing list