Welcome! Log In Create A New Profile

Advanced

Re: Nginx Rewrite Apache?

April 15, 2011 05:36PM
I've next trouble

This for nginx
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^www\.zzz\.pl$ [NC]
RewriteRule ^(.*)$ http://zzz.pl/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule .* index.php?$0 [PT,L]
This is uri but i use this conf


and this not work

server {
listen 80;
server_name zzz.lifeisbrutal.pl;

# access_log /var/log/nginx/zzz.log;
# error_log /var/log/nginx/zzz.log;

root /home/zzz/public_html;
index index.php index.html index.htm;

location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?$1 last;
}
}

location ~ .php($|/) {

set $script $uri;
set $path_info "";

if ($uri ~ "^(.+.php)(/.+)") {
set $script $1;
set $path_info $2;
}

fastcgi_pass 127.0.0.1:9002;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$script;
fastcgi_param SCRIPT_NAME $script;
fastcgi_param PATH_INFO $path_info;

fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;

fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;

fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;

fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param REDIRECT_STATUS 200;

}

}
Subject Author Posted

Nginx Rewrite Apache?

Adrian Janeczek April 11, 2011 05:19PM

Re: Nginx Rewrite Apache?

António P. P. Almeida April 11, 2011 05:34PM

Re: Nginx Rewrite Apache?

Steve April 11, 2011 05:38PM

Re: Nginx Rewrite Apache?

Adrian Janeczek April 11, 2011 05:48PM

Re: Nginx Rewrite Apache?

Adrian Janeczek April 11, 2011 05:50PM

Re: Nginx Rewrite Apache?

Adrian Janeczek April 11, 2011 05:59PM

Re: Nginx Rewrite Apache?

Steve April 11, 2011 06:10PM

Re: Nginx Rewrite Apache?

Adrian Janeczek April 11, 2011 06:15PM

Re: Nginx Rewrite Apache?

Adrian Janeczek April 11, 2011 06:47PM

Re: Nginx Rewrite Apache?

António P. P. Almeida April 11, 2011 06:14PM

Re: Nginx Rewrite Apache?

Francis Daly April 11, 2011 06:16PM

Re: Nginx Rewrite Apache?

António P. P. Almeida April 11, 2011 06:24PM

Re: Nginx Rewrite Apache?

António P. P. Almeida April 11, 2011 05:52PM

Re: Nginx Rewrite Apache?

Adrian Janeczek April 15, 2011 05:36PM

Re: Nginx Rewrite Apache?

Francis Daly April 18, 2011 08:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 230
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready