Hi everyone,
I have been trying to get this working since last two days. Site root is running a rails app without any problems. I haven't been able to figure out how to do rewrite rules for WordPress. I have installed Nginx, Php and everything. Blog is online and it doesn't have any styling. CSS files are giving 200 code, but still something is wrong with them. Images are giving 403 errors. Once that are not will look like this, http://www.zesty.co.uk/blog/wp-content/uploads/2013/03/Screen-Shot-2013-03-25-at-19.27.36.png
Following is how my current config file look like,
upstream unicorn {
server unix:/tmp/unicorn.zesty.sock fail_timeout=0;
}
server {
listen 80;
server_name zesty.co.uk;
location ^~ /blog/ {
root /home/deployer/apps/zesty;
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^(.*)$ /blog/index.php?q=$1 last;
}
location /blog/.*+.(jpg|jpeg|gif|css|png|js|ico|htm|html)$ {
root /home/deployer/apps/zesty/blog;
access\_log off;
expires 30d;
}
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
location / {
root /home/deployer/apps/zesty/current/public;
if (!-f $request_filename) {
proxy_pass http://unicorn;
break;
}
}
}
I tried few things and the code is messed up a little. Any help to solve this will be appreciated.
Thanks Tharindu