MAX2PLAY on nginx

This topic contains 2 replies, has 3 voices, and was last updated by  flysurfer premium 1 year, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • 18. October 2015 at 20:58 #16422

    Is it possible to install MAX2PLAY on NGINX instead of APACHE2.

    Nginx is faster at serving static files and consumes much less memory for concurrent requests.

    Regards Silver

    20. October 2015 at 16:55 #16444

    Hi L-J Silver,
    With Max2Play, the requests and workload of apache is marginal. Thus we have not yet considered using another server software. However, NGINX should work with Max2Play without any problems. We will investigate its merits and report whether or not an implementation or an option for the software would be feasible.

    20. October 2015 at 18:00 #16446

    Hi Silver,

    you may test nginx by installing it with

    apt-get install php5-fpm nginx -y

    using this config file for Max2Play:

    server {
    	listen   81; ## listen for ipv4; this line is default and implied
    	#listen   [::]:80 default_server ipv6only=on; ## listen for ipv6
    
    	root /var/www/max2play/public;
    	index index.php;
    
    	location / {
            error_page  404 = /index.php?q=$uri;
            log_not_found  off;
        }
    	
    	location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
            access_log off;
            expires 30d;
            root /var/www/max2play/public;
        }        
    
    	# Rewrite rule
        if (!-e $request_filename) {
            rewrite ^(.*)$ /index.php?page=$1 last;
        }
    
    	# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        location ~ \.php$ {
    		fastcgi_pass   unix:/var/run/php5-fpm.sock;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /var/www/max2play/public$fastcgi_script_name;
    		include fastcgi_params;
        }
    
    	# deny access to .htaccess files, if Apache's document root
    	# concurs with nginx's one
    	location ~ /\.ht {
    		deny all;
    	}
    }

    Open the web interface with http://max2play:81 – the original apache web server is still running on Port 80. We did not test this yet – there may be some problems on nginx…

    • This reply was modified 1 year, 1 month ago by  flysurfer.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Register here