Skip to content

Instantly share code, notes, and snippets.

@panchicore
Created May 3, 2013 20:27
Show Gist options
  • Save panchicore/5513768 to your computer and use it in GitHub Desktop.
Save panchicore/5513768 to your computer and use it in GitHub Desktop.
deploy a wordpress into a subfolder where the domain context is a django project. use /blog/ context path.
# wordpress files must live here:
# /home/ubuntu/www/blog.xxx.com/wordpress/blog/
server {
.....
root /home/ubuntu/www/blog.xxx.com/wordpress;
location /blog/ {
index index.php;
if (-e $request_filename) {
break;
}
rewrite ^/(.+)$ /index.php?q=$1 last;
}
location ~ .php {
include /usr/local/nginx/conf/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/ubuntu/www/blog.xxx.com/wordpress$fastcgi_script_name;
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}
......
location / {
......
}
} # closes server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment