404 Not Found - Wordpress 3.0 Multisite Enabled + Buddypress
-
When trying to change the Blog or Profile Avatar I get a 404 Not Found error. This has something to do with the rewrite rules and the way it handles images I am pretty sure. I just don't know what to change.
-------------------------server
{
listen 80;
server_name honeysqueeze.org *.honeysqueeze.org;
access_log /home/public_html/honeysqueeze.org/log/access.log;
error_log /home/public_html/honeysqueeze.org/log/error.log;
# rewrite rule - files
location ~* ^.+.(xml|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf)
{
root /home/public_html/honeysqueeze.org/public;
rewrite ^/files(/.*)$ /wp-content/blogs.php?file=$1 last;
expires 10d;
break;
}
# rewrite rule - sitemap
rewrite ^(.*/)?sitemap.xml wp-content/sitemap.php;
# rewrite rule - errors
location /
{
root /home/public_html/honeysqueeze.org/public;
index index.php;
if (!-e $request_filename)
{
rewrite ^(.+)$ /index.php?q=$1 last;
}
}
# php requests - fast cgi
location ~ .php$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/public_html/honeysqueeze.org/public$fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi_params;
}
}Posted 1 year ago # -
I found a solution, here it is for reference.
server
{
listen 80;
server_name honeysqueeze.org *.honeysqueeze.org;
access_log /home/public_html/honeysqueeze.org/log/access.log;
error_log /home/public_html/honeysqueeze.org/log/error.log;
# rewrite rule - files
location / {
root /home/public_html/honeysqueeze.org/public;
index index.php;gzip on;
gzip_http_version 1.0;
gzip_vary on;
gzip_comp_level 3;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_buffers 16 8k;if (!-e $request_filename) {
rewrite ^.+/?(/ms-.*) $1 last;
rewrite ^/files/(.+) /wp-includes/ms-files.php?file=$1 last;
rewrite ^.+/?(/wp-.*) $1 last;
rewrite ^.+/?(/.*\.php)$ $1 last;
rewrite ^(.+)$ /index.php?q=$1 last;
expires 10d;
break;}
}location ~* ^.+.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$
{
root /home/public_html/honeysqueeze.org/public;
rewrite ^/.*(/wp-.*/.*.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;
rewrite ^.*/files/(.*(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ /wp-includes/ms-files.php?file$
if (!-e $request_filename) {
rewrite ^.+/?(/wp-.*) $1 last;
rewrite ^.+/?(/.*.php)$ $1 last;
rewrite ^(.+)$ /index.php?q=$1 last;
}expires 30d;
break;
}
# php requests - fast cgi
location ~ .php$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/public_html/honeysqueeze.org/public$fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi_params;
}
}Posted 1 year ago # -
Yes, I was going to mention that the blogs.php file should be deleted that that you should replace the rewrite rule with ms-files.php.
Posted 1 year ago #
Reply
You must log in to post.
Want HTML?
a blockquote code em strong ul ol liPlace code between backticks `codeHere`
You've got it.
