amember 4 + Nginx

Discussion in 'Installation' started by descifradoinn, Apr 4, 2016.

  1. descifradoinn

    descifradoinn New Member

    Joined:
    Mar 20, 2012
    Messages:
    14
    So i want to install the new amember with a nginx instance.
    Anybody already try this. Is very little information out the about amember + nginx.

    Can anybody paste some config sample on nginx?

    Best Regards
  2. jenolan

    jenolan aMember Coder

    Joined:
    Nov 3, 2006
    Messages:
    493
    The FAQ has a small snippet http://www.amember.com/docs/Frequently_Asked_Questions

  3. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    1,670
  4. descifradoinn

    descifradoinn New Member

    Joined:
    Mar 20, 2012
    Messages:
    14
    Hi Guys

    Tahnks for your replys... actually i tried with the snippet in the distribution .htaccess and paste it in my nginx config file..

    here my nginx site config

    Code:
    server {
    
            listen 80 default_server;
            listen [::]:80 default_server ipv6only=on;
    
            root /home/userxyz/sites/xyzsite.com/www;
            index index.php index.html index.htm;
    
            server_name xyzsite.com www.xyzsite.com;
            access_log /home/userxyz/sites/xyzsite.com/logs/access.log;
            error_log /home/userxyz/sites/xyzsite.com/logs/error.log;
    
    
            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; }
    
           #wordpress query string
            location / {
                    try_files $uri $uri/ /index.php?q=$uri&$args;
            }
    
            error_page 404 /404.html;
            error_page 500 502 503 504 /50x.html;
            location = /50x.html {
                    root /usr/share/nginx/html;
            }
    
            location ~ \.php$ {
                    try_files not-existing-file @php;
            }
    
            location @php {
                    try_files $uri =404;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    include fastcgi_params;
            }
    
            location ~ /\.ht {
                    deny all;
            }
    }
    But after restart php-fpm and nginx server and still receiving this screenshot:


    Captura de pantalla 2016-04-07 a las 6.47.24 p.m..png

    and struggling all the day with this without positive solution. Can you help me with your knowledge?

    Thanks guys!
  5. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    1,670

Share This Page