Serving an alternate robots.txt for SSL requests.

Juan Fco. Giordana juangiordana at gmail.com
Wed Jan 14 14:38:44 MSK 2009


Thanks again Igor,

Yes, that was exactly the first approach I tried. A couple months ago I 
was quite impressed when that feature came out but needed to downgrade 
to 0.6 because before going to production :)

I knew it was possible but didn't remember/know if there were support 
for this on 0.6.

Thanks a lot and hope this clarify the doubts of others.

Igor Sysoev wrote:
> If your servers are different only in this part, then in 0.7 you can
> 
>      server {
>          listen 80;
>          listen 443 default ssl;
> 
>          location = /robots.txt {
>              if ($server_port = 443) {                # or ($scheme = https)
>                   rewrite ^   /robots_ssl.txt  last;  # or "break;"
>              }
>          }
> 






More information about the nginx mailing list