BrainCMS Nginx config

Twan

Active Member
Feb 14, 2011
198
44
Hi,

I want to setup BrainCMS on Nginx, PHP is working and Nginx is also running. Im now at the point for the config. Its almost working, i can get to the index, but not to /register. Only if i use it as index.php?url=register. Seems like the converted lines are giving errors.

The config code:
Code:
        location / {
            root   html;
            index  index.php index.html index.htm;
            if (!-e $request_filename){
              rewrite ^/out/([^/]+)(|/)$ /out.php?out=$1;
            }
            rewrite ^/([a-zA-Z0-9_-]+)(|/)$ /index.php?url=$1;
            rewrite ^/(.*)\.htm$ /$1.php;
        }
      
        location /news {
            rewrite ^/news/([a-zA-Z0-9_-]+)(|/)$ /index.php?url=news&id=$1;
        }

        location /home {
            rewrite ^/home/([a-zA-Z0-9_-]+)(|/)$ /index.php?url=home&user=$1;
        }

        location /settings2fa {
            rewrite ^/settings2fa/([a-zA-Z0-9_-]+)(|/)$ /index.php?url=settings2fa&step=$1;
        }

        location /habbo {
            rewrite ^/habbo-imaging/badge/([a-zA-Z0-9_-]+)(|/)$ /habbo-imaging/badge.php?badge=$1;
        }

        location /register {
            rewrite ^/register/([a-zA-Z0-9_-]+)(|/)$ /index.php?url=register&userref=$1;
        }

        location /newpassword {
            rewrite ^/newpassword/([a-zA-Z0-9_-]+)(|/)$ /index.php?url=newpassword&key=$1;
        }

Regards,
Twan
 
Last edited:

Users who are viewing this thread

Top