Update document root directory setting in README.md and the example nginx.conf

This commit is contained in:
Yi Wang 2013-11-02 23:17:30 +08:00
parent 05cc531ee2
commit 23d1ff7221
2 changed files with 15 additions and 3 deletions

View File

@ -91,6 +91,14 @@ it, these are the steps:
mv nginx.conf nginx.conf.bak # backup the configuration file. mv nginx.conf nginx.conf.bak # backup the configuration file.
ln -s ~/Projects/markdown-renderer/src/github.com/wangkuiyi/markdown-renderer/nginx.conf ln -s ~/Projects/markdown-renderer/src/github.com/wangkuiyi/markdown-renderer/nginx.conf
1. (Optional) Edit `nginx.conf` to specify the document root
directory to be where Markdown Renderer source code is.
location / {
root /Users/wangyi/Projects/markdown-renderer/src/github.com/wangkuiyi/markdown-renderer;
}
1. Start Nginx. 1. Start Nginx.
/usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx
@ -102,3 +110,7 @@ it, these are the steps:
~/Projects/markdown-renderer/bin/markdown-renderer ~/Projects/markdown-renderer/bin/markdown-renderer
### Trouble Shooting
Markdown Renderer requires that the Markdown filename matches the
regular expression `^/([_a-zA-Z0-9]+)\\.md$)`.

View File

@ -10,8 +10,8 @@ http {
server_name localhost; server_name localhost;
location / { location / {
root /Users/wangyi/site; root /Users/wangyi/Projects/markdown-renderer/src/github.com/wangkuiyi/markdown-renderer;
index index.md; index README.md;
} }
location ~ \.md$ { location ~ \.md$ {
proxy_pass http://localhost:8002; # Markdown Renderer server. proxy_pass http://localhost:8002; # Markdown Renderer server.
@ -23,7 +23,7 @@ http {
server_name localhost; # Markdown source loader server. server_name localhost; # Markdown source loader server.
location / { location / {
root /Users/wangyi/site; root /Users/wangyi/Projects/markdown-renderer/src/github.com/wangkuiyi/markdown-renderer;
} }
} }
} }