LoginSignup
6
4

More than 5 years have passed since last update.

repository内のrobot.txtをnginxで公開

Posted at

productionでだけrobot.txtが表示されない問題というのがあったのですが、robot.txtをappで返すのがどっちにしろ気持ち悪かったので、nginxで返却するようにしました。

+    location ~ ^/robots.txt$ {
+        log_not_found off;
+        alias /home/your_name/project_name/current/public/robots.txt;
+    }
6
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
4