Need help configuring nginx....

Discussion in 'aMember Pro v.4' started by etaporg1, Mar 14, 2014.

  1. etaporg1

    etaporg1 New Member

    Joined:
    Mar 12, 2014
    Messages:
    2
    I am trying to upgrade/migrate our site from amember3 to amember4.

    Put the new source in, went to amember/index.php, I get a login page fine. When I click on login, it wants to go to amember/index.php/login, and results in "No input file specified."

    I tried changing the nginx config file to what was recommended in the .htaccess file, that results in the connection just getting reset. I can put a test.php in the amember directory, and that works fine.

    The old config file has this related to php and amember:

    location /amember/ {
    index index.php index.html;
    try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix://tmp/php.sock;
    include fastcgi_params;
    index index.php index.html;
    }


    The new, non-working config has:
    location ~* ^/amember/.*\.(js|ico|gif|jpg|png|css|swf|csv)$ {}
    location ~* ^/amember/setup/index.php$ { try_files not-existing-file @php; }
    location ~* ^/amember/js.php { try_files not-exiting-file @php; }
    location ~* ^/amember/index.php$ { try_files not-existing-file @php; }
    location ~* ^/amember/public.php$ { try_files not-existing-file @php; }

    location ~* ^/amember/public { rewrite ^.*$ /amember/public.php; }
    location ~* ^/amember/setup { rewrite ^.*$ /amember/setup/index.php; }
    location ~* ^/amember { rewrite ^.*$ /amember/index.php; }
    location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix://tmp/php.sock;
    include fastcgi_params;
    index index.php index.html public.php;
    try_files not-existing-file @php;
    }

    location @php {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix://tmp/php.sock;
    include fastcgi_params;
    #index index.php index.html public.php;
    }

    I'll admit that I've tried commenting out and uncommenting different lines,the best results have been with the original config, but that still doesn't get me to a point where I can access amember/admin-import3 to even start the converstion.

    I inherited this project, the meat of the site is in django, so nginx is required. I personally would not have chosen it, but it's what I've got. We need to get this upgrade in for security, and I'm stumped, so any help would GREATLY appreciated.

    annalisa (for etap)
  2. etaporg1

    etaporg1 New Member

    Joined:
    Mar 12, 2014
    Messages:
    2
    I've been reading forum and nginx docs, no progress.

    As a recap - with old configuration, I can get to pages ending in .php, but things like ".../amember/index.php/login get me "no input file specified", which seems to indicate a file not found (and indeed, there is no such file).

    The configuration provided with amember4 gives me no data or connection reset. I see the note that the location @php part is required, but I can't figure out what it's supposed to do. Specifically, I can't figure out how to tell nginx what to do with the /login after index.php. It *looks* to me as if the @php part does the same thing the location ~ \.php$ from the configuration file does, except doesn't require the file to end in .php ... except there's actually no file called login (or admin-import3, which is what I really need). I can get to setup, which tells me there's already a config file (as I went through the setup, thinking that if I did that, it would get me to the import script).

    I can put the entire config files if needed, but they're long.

    Would appreciate any hints.
  3. essam_saad

    essam_saad aMemberer

    Joined:
    Apr 14, 2014
    Messages:
    6
    Hi @etaporg1,
    Have you made any progress with nginx?

Share This Page