Nginx rewrite config, revcms??

Bozzie

New Member
Jun 19, 2011
26
0
Has anyone got a config file for revcms for nginx? i've tried using
"
worker_processes 2;
worker_rlimit_nofile 10000;
pid /var/run/nginx.pid;


events {
worker_connections 4000;
use epoll;
}


http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
gzip on;


server {
listen MYVPSIP:80;
server_name MYVPSIP;
root /var/www/html;
index index.php index.html index.htm;


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


# use fastcgi for all php files
location ~ \.php$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}"
but have no look as when I goto localhost it's just , thanks in advance.
 

LeChris

github.com/habbo-hotel
Sep 30, 2013
2,744
1,326
Code:
# nginx configuration
location / {
rewrite ^/(|/)$ /index.php?url=$1;
rewrite ^/([a-zA-Z0-9_-]+)(|/)$ /index.php?url=$1;
rewrite ^/(.*)\.htm$ /$1.php;
rewrite ^/(|/)$ /dash.php?page=$1;
rewrite ^/([a-zA-Z0-9_-]+)(|/)$ /dash.php?url=$1;
}
 

Bozzie

New Member
Jun 19, 2011
26
0
So it'd be like this? "
worker_processes 2;
worker_rlimit_nofile 10000;
pid /var/run/nginx.pid;


events {
worker_connections 4000;
use epoll;
}


http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
gzip on;


server {
listen localhost:80;
server_name localhost;
root /var/www/html;
index index.php index.html index.htm;


location / {
rewrite ^/(|/)$ /index.php?url=$1;
rewrite ^/([a-zA-Z0-9_-]+)(|/)$ /index.php?url=$1;
rewrite ^/(.*)\.htm$ /$1.php;
rewrite ^/(|/)$ /dash.php?page=$1;
rewrite ^/([a-zA-Z0-9_-]+)(|/)$ /dash.php?url=$1;
}



# use fastcgi for all php files
location ~ \.php$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}"?? everyone starts somewhere mate, i'm setting it up to avoid my server getting HTTP flooded.
 

Users who are viewing this thread

Top