Skip to content
Browse files

Fixing the nginx config to fix issue #93

  • Loading branch information...
1 parent 092bc9d commit c64967942efea2a75381f61fcea5185c07cb2aed @ericholscher ericholscher committed Aug 22, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 deploy/cookbooks/main/templates/default/readthedocs
View
10 deploy/cookbooks/main/templates/default/readthedocs
@@ -11,6 +11,7 @@ server {
}
server {
+ index index.html index.htm;
listen 80;
listen 8000 default;
server_name readthedocs.org;
@@ -41,6 +42,11 @@ server {
add_header X-Deity <%= node.hostname %>;
}
+ location ~* /docs/(?P<project>.+)/en/(?P<version>.+) {
+ rewrite .* http://readthedocs.org/docs/$project/en/$version/;
+ }
+
+
location / {
proxy_pass http://127.0.0.1:8888;
proxy_buffering off;
@@ -90,7 +96,7 @@ server {
add_header X-Deity <%= node.hostname %>;
}
location / {
- rewrite (.*) http://$domain.readthedocs.org/en/latest/?redir;
+ rewrite (.*) http://$domain.readthedocs.org/en/latest/;
}
location @fallback {
proxy_pass http://127.0.0.1:8888;
@@ -104,7 +110,7 @@ server {
server {
listen 8000;
- server_name rtfd.org sphinxdocs.com www.readthedocs.com readthedocs.com www.readthedocs.org djangowoodies.com;
+ server_name sphinxdocs.com www.readthedocs.com readthedocs.com www.readthedocs.org djangowoodies.com;
rewrite ^(.*) http://readthedocs.org$1;
}

0 comments on commit c649679

Please sign in to comment.
Something went wrong with that request. Please try again.