Recent Topics

nginx config

Started by on Feb 02, 2016 – Contents updated: Jul 08, 2017

Feb 02, 2016 12:42    

Hello all!

Can anyone share actual config for Nginx for b2evolution?

I wrote this but I can't write a rule for global.php (wrapper for images?)
My current config:


server {


listen  80;
server_name   tt tt.mydomain.com ;

gzip on; 
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;

access_log    /var/tt/logs/nginx/access.log   main;
error_log     /var/tt/logs/nginx/error.log;

server_tokens off;
add_header    X-Frame-Options "SAMEORIGIN";

location /      {
                root /var/tt/www/;
                index index.htm index.html index.php;
                if (!-e $request_filename) {
                        rewrite ^(.+)$ /index.php?$request_uri last;
                                           }
                }

location ~ \.php$ {
                root /var/tt/www;
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME /var/tt/www$fastcgi_script_name;
                include fastcgi_params;
                }
}

Thank you! :)

Feb 04, 2016 01:21

What do you mean with

I wrote this but I can't write a rule for global.php (wrapper for images?)

which part of .htaccess are you having trouble with?


Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.