Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2011-11-09 18:13:24

BumbleBee
Member
Registered: 2011-10-22
Posts: 18

Nginx rewrite rule

Hi,

Have anyone rewrite rule (or config file) for nginx?


Sorry for my bad english smile

Offline

#2 2011-11-09 21:15:55

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: Nginx rewrite rule

Unfortunately i dont have the nginx rewrite rules. Didnt use nginx that much yet sad


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2012-03-22 08:10:58

blacky
Member
Registered: 2012-03-22
Posts: 1

Re: Nginx rewrite rule

There is simple solution for nginx:

server {
    server_name pornfan.tv www.pornfan.tv;
    access_log /usr/share/nginx/html/pornfan/log/pornfan_access.log;
    error_log /usr/share/nginx/html/pornfan/log/pornfan_error.log;
    root /usr/share/nginx/html/pornfan/public;

    if ($host ~* ^[^.]+\.[^.]+$) {
        rewrite ^(.*)$ http://www.$host$1 permanent;
    }

    location / {
        index index.html index.htm index.php;
    }

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

    location ~ \.php$ {
        include /etc/nginx/fastcgi_params;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        add_header X-PHP-Script $fastcgi_script_name;
        add_header X-PHP-Args $args;
    }

}

Offline

#4 2012-03-22 10:04:45

ionut
Moderator
Registered: 2012-03-12
Posts: 32

Re: Nginx rewrite rule

@blacky thanks for the solution.

Offline

Board footer

Powered by FluxBB