hi
I have read many forums and tried many settings and I can not get it to
work, I need help
I swear I’ve tried many rules combination and settings
these are the rules for apache for wordpress 2.8.6, but I need to do the
rewrite in nginx (proxy reverse, in front of apache)
RewriteEngine On
RewriteBase /
#uploaded files
RewriteRule ^(./)?files/$ index.php
RewriteCond %{REQUEST_URI} !.wp-content/plugins.
RewriteRule ^(. /)?files/(.*) wp-content/blogs.php?file=$2
add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . -
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.) $2
RewriteRule ^([_0-9a-zA-Z-]+/)?(. .php)$ $2
RewriteRule . index.php
which is the translation of these rules for nginx? help PLEASE!!
Posted at Nginx Forum:
hi I have read many forums and tried many settings and I can not get it to work, I need help I swear I've tried many rules combination and settings these are the rules for apache for wordpress 2.8.6, but I need to do the rewrite in nginx (proxy...
this is my config, I forgot to put it, sorry
server{
listen *:80;
server_name blogs.domain.com ;
root /xx/xxxx/xx/blogs/;
index index.php index.html index.htm;
#rules mod rewrite wordpress
????????
#Proxy the PHP scripts to Apache listening on 127.0.0.1:8080
location ~ \.php$ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8080;
}
}
Posted at Nginx Forum:
hi I have read many forums and tried many settings and I can not get it to work, I need help I swear I've tried many rules combination and settings these are the rules for apache for wordpress 2.8.6, but I need to do the rewrite in nginx (proxy...
but then I would have to activate the mod rewrite in apache not? I did
not want to activate it but if not do it with nginx …
I know that with nginx works perfectly but I am unable to configure the
rules correctly on nginx
thank you very much for the help
Posted at Nginx Forum:
hi I have read many forums and tried many settings and I can not get it to work, I need help I swear I've tried many rules combination and settings these are the rules for apache for wordpress 2.8.6, but I need to do the rewrite in nginx (proxy...
well, I can activate the module in apache and set the rules directly
into the virtualhost configuration without reading the htaccess
but also load a module to do something that I can do in nginx, thus
could not serve static content directly nginx because I need to rewrite
the url before reaching apache
Posted at Nginx Forum:
hi I have read many forums and tried many settings and I can not get it to work, I need help I swear I've tried many rules combination and settings these are the rules for apache for wordpress 2.8.6, but I need to do the rewrite in nginx (proxy...
ok
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . -
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.) $2
RewriteRule ^([_0-9a-zA-Z-]+/)?(. .php)$ $2
RewriteRule . index.php
if (!-e $request_filename) {
rewrite ^([_0-9a-zA-Z-]+/)?(wp-.) $2 last;
rewrite ^([_0-9a-zA-Z-]+/)?(. .php)$ $2 last;
rewrite ^. index.php last;
}
}
is this equivalent?
I created a blog named test with the above rules, with
http://blogs.domain.com/test/ I get a Bad Request response (Your browser
sent a request that this server could not understand.) from apache
( Invalid URI in request GET index.php HTTP/1.0
apache error_log)
http://blogs.domain.com/test/ only match with “rewrite ^. index.php
last;” not? then… I do not understand how it works in nginx apache and
not with those rules
thanks!
Posted at Nginx Forum:
hi I have read many forums and tried many settings and I can not get it to work, I need help I swear I've tried many rules combination and settings these are the rules for apache for wordpress 2.8.6, but I need to do the rewrite in nginx (proxy...
Yes, you need to enable mod_rewrite under apache. Since ngnix doesn’t
handle the PHP, it doesn’t work if you try it with nginx.
As I mentioned, just enable mod_rewrite under apache and make sure
.htaccess writable by wp mu.
You don’t need any rewrite rules if you are proxying PHP to apache.
Just make sure your .htaccess file is writable by wordpress.
On Tue, Dec 01, 2009 at 11:33:25AM -0500, pepejose wrote:
#uploaded files
RewriteRule . -
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.) $2
RewriteRule ^([_0-9a-zA-Z-]+/)?(. .php)$ $2
RewriteRule . index.php
which is the translation of these rules for nginx? help PLEASE!!
Begin from simple
location / {
try_files $uri /index.php;
}
–
Igor S.
http://sysoev.ru/en/