Nginx Configuration, Restrict access to login


First of all, I know that Nginx it's almost a forbidden topic in Concrete5 group but I don't have any other choice now and I will appreciate all the possible help.

Before, using Joomla and Wordpress CMS I could restrict very easily the access to Administration Area, granting the access to one IP. But I can not do the same with Concrete5, I always get strange results, like a 404 Page Not Found.

location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_index index.php;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param   SCRIPT_NAME   $fastcgi_script_name;
        # Support Clean (aka Search Engine Friendly) URLs
        location / {
                try_files $uri $uri/ /index.php?$args;
        #Deny Access to Administrator Panel
        location /login {

At this point I can login if I enter index.php/login.
But if I change to :
location ~* login {
                deny all;

I always get 404 page not found if I access using the allowed IP(strange) and and 403 if I use different IP(correct).

All the help will be appreciated, thank you very much.
Best regards.

View Replies: