Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:jgm/gitit

  • Loading branch information...
commit e7abc5d7cd4290efc72dca98bbb32e39d8f08d80 2 parents e01f26c + 8b14a55
John MacFarlane authored
Showing with 25 additions and 1 deletion.
  1. +5 −1 Network/Gitit/Util.hs
  2. +20 −0 README.markdown
View
6 Network/Gitit/Util.hs
@@ -61,7 +61,11 @@ inDir d action = do
-- | Perform a function in a temporary directory and clean up.
withTempDir :: FilePath -> (FilePath -> IO a) -> IO a
-withTempDir baseName = bracket (createTempDir 0 baseName) removeDirectoryRecursive
+withTempDir baseName f = do
+ oldDir <- getCurrentDirectory
+ bracket (createTempDir 0 baseName)
+ (\tmp -> setCurrentDirectory oldDir >> removeDirectoryRecursive tmp)
+ f
-- | Create a temporary directory with a unique name.
createTempDir :: Integer -> FilePath -> IO FilePath
View
20 README.markdown
@@ -478,6 +478,26 @@ loaded, and set up a virtual host with the following configuration:
Reload your apache configuration and you should be all set.
+Using nginx to achieve the same
+-------------------------------
+
+Drop a file called `wiki.example.com.conf` into `/etc/nginx/conf.d`
+(or where ever your distribution puts it).
+
+ server {
+ listen 80;
+ server_name wiki.example.com
+ location / {
+ proxy_pass http://127.0.0.1:5001/;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_redirect off;
+ }
+ access_log /var/log/nginx/wiki.example.com.log main;
+ }
+
+Reload your nginx config and you should be all set.
+
+
Proxying to `http://mysite.com/wiki`
------------------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.