Difference between revisions of "Nginx"

From aMember Pro Documentation
Jump to: navigation, search
(Created page with " If your server uses NGINX webserver software instead of commonly used Apache, it will be necessary to setup configuration rules into ''nginx''.conf. Nginx is usually used on...")
 
(No difference)

Latest revision as of 10:21, 17 April 2019

If your server uses NGINX webserver software instead of commonly used Apache, it will be necessary to setup configuration rules into nginx.conf. Nginx is usually used on dedicated webservers for professional high-load projects.

Nginx provides much more flexibilty in configuration, so it is hard to provide configuration lines that will be working on any webserver. These lines below is just idea what must be done to get things working.

location ~* ^/amember/.*\.(js|ico|gif|jpg|png|css|swf|csv|svg)$ {}
location ~* ^/amember/setup/index.php$ { try_files not-existing-file @php; }
location ~* ^/amember/js.php { try_files not-existing-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 ~* /amember/data/public/* {}
location ~* /amember/data/.* {internal;}

# lines above provided for case when you have something like that in your nginx configuration:
#
#       location ~ \.php$ {
#          try_files not-existing-file @php;
#       }
#       location @php {
#         fastcgi_pass 127.0.0.1:9000;
#         include fastcgi_params;
#       }
#
#  it is necessary to have @php section, as it is referred by aMember rules, and
#  it must be located at bottom

Contact aMember Pro support team to get assistance with Nginx setup.