Adult Script Pro Community Forums

Create, help and share your ideas with the community!

You are not logged in.

#1 2012-12-18 00:35:51

mario2000
Member
From: Spain
Registered: 2012-05-04
Posts: 190
Website

Configure NGINX

Hi - i need some help to configure NGINX

I have instaled in my server the cpnginx - http://cpnginx.com/
Apache 2.2
ContOS 6.3
WHM 11.34
---------------------------------------------------

First step - In the admin panel of ASPro (admin-video-config-view) i have selected
Streaming Method:  pseudostreaming
Streaming Server:  nginx

This is correct????
------------------------------------------------
Right now i cant skyp the pocicion in the player. I need to make some configuration file for nginx, but i have no idea about how and where i need to upload this file.

Thanks


Brutal Porn Videos - Brutal5.org
Peliculas Online - PepeCine
Filme Online Romana - Filme5

Offline

#2 2012-12-18 15:05:48

ful2fun.com
Member
From: India
Registered: 2011-09-16
Posts: 1,038
Website

Re: Configure NGINX

nginx is difficult for runinng but i think you installed cpnginx with is plugin for whm/control panel to reduce load of traffic on server. it uses nginx by redirecting visitors though nginx instead of apache...... So Conclusion Is Apache Still Working Along With nginx.........



ful2fun.com
livesexpirates.com

Offline

#3 2012-12-18 19:53:37

mario2000
Member
From: Spain
Registered: 2012-05-04
Posts: 190
Website

Re: Configure NGINX

ful2fun.com wrote:

nginx is difficult for runinng but i think you installed cpnginx with is plugin for whm/control panel to reduce load of traffic on server. it uses nginx by redirecting visitors though nginx instead of apache...... So Conclusion Is Apache Still Working Along With nginx.........

Yes is the cpnginx plugin, now the server load more fast all content but i cant skyp the video posicion in the player, is like the progresive streaming.

Any help on this?


Brutal Porn Videos - Brutal5.org
Peliculas Online - PepeCine
Filme Online Romana - Filme5

Offline

#4 2012-12-18 20:02:14

ful2fun.com
Member
From: India
Registered: 2011-09-16
Posts: 1,038
Website

Re: Configure NGINX

it should not stop  but for this you need to talk adrian for nignx settings

Offline

#5 2012-12-19 07:36:26

symtab
Administrator
Registered: 2010-08-23
Posts: 7,366
Website

Re: Configure NGINX

You need to add this to your virtual host nginx configuration file:

        location ~ \.flv$ {
            secure_link $arg_st,$arg_e;
            secure_link_md5 p4ss#W0rd$uri$arg_e$remote_addr;

            if ($secure_link = "") {
                        return 403;
            }

            if ($secure_link = "0") {
                        return 403;
            }

            flv;
        }

        location ~ \.mp4$ {
            secure_link $arg_st,$arg_e;
            secure_link_md5 p4ss#W0rd$uri$arg_e$remote_addr;

            if ($secure_link = "") {
                        return 403;
            }

            if ($secure_link = "0") {
                return 403;
            }

            mp4;
            mp4_buffer_size     1m;
            mp4_max_buffer_size 5m;
        }

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - PopAds

Offline

#6 2012-12-19 15:54:35

mario2000
Member
From: Spain
Registered: 2012-05-04
Posts: 190
Website

Re: Configure NGINX

Thanks for the configuration file, but i have no idea about wher and how to paste this code.
I belive i need to use ssh, or i can paste this in the Configuration Editor , then Rebuild Vhost and Restart Nginx???

In my cpnginx plugin for cpanel i have this sections:

- Settings
- Configuration Editor
- Rebuild Vhosts
- Restart Nginx
- Edit file Extensions
- Edit Proxy Settings
- Direct Push
- List Direct Push
- Set Expire Time
-----------------------------------------
-----------------------------------------
SETINGS
Cpnginx Port: 80
Expire Time: 30d
Cpphp Path : /usr/local/cpanel/3rdparty/bin/php
--------------------------------------------
Configuration Editor - this code

# cPanel Nginx Master configuration
user  nobody;
error_log  logs/error.log;
#Number of worker you need
worker_processes  1;
# How many connections a worker can handle maximum.
events {
    worker_connections  50000;
}
http {
	include    mime.types;
 	default_type  application/octet-stream;
 	sendfile on;
	server_names_hash_max_size 10000;
        server_names_hash_bucket_size 1024;
 	tcp_nopush on;
 	tcp_nodelay on;
 	keepalive_timeout  10;
 	gzip on;
 	gzip_min_length  1100;
 	gzip_buffers  4 32k;
 	gzip_types    text/plain  application/x-javascript text/xml text/css;
 	ignore_invalid_headers on;
 	client_header_timeout  3m;
 	client_body_timeout 3m;
 	send_timeout     3m;
 	include "/usr/local/nginx/conf/vhost.conf";
 	include "/etc/cpnginx/cpanelproxy.conf";
}
                       

------------------------------------------------------------
Edit file Extensions - this list

jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|iso|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|mp3|ogv|ogg|flv|swf|mpeg|mpg|mpeg4|mp4|avi|wmv|js|css|3gp|sis|sisx|nth
------------------------------------------------------------
Edit Proxy Settings

client_max_body_size    2000m;
client_body_buffer_size 512k;
proxy_send_timeout   90;
proxy_read_timeout   90;
proxy_buffer_size    32k;
proxy_buffers     16 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
proxy_connect_timeout 300s;
-----------------------------------------------------------
Direct Push - (This option will allow you to do complicated .htaccess redirects, 301 requests and password protected folders of domains and sub domains. You may need to rebuild nginx vhost and restart nginx server after enabling/disabling direct push.)

Is empty - no domain selected
----------------------------------------------------------


Brutal Porn Videos - Brutal5.org
Peliculas Online - PepeCine
Filme Online Romana - Filme5

Offline

#7 2012-12-19 16:10:14

symtab
Administrator
Registered: 2010-08-23
Posts: 7,366
Website

Re: Configure NGINX

I do not know how to configure nginx using cpanel (never used cpanel with nginx before). What i can tell you is that the configuration needs to be added on a vhost context, eg: server { ... HERE }. I'm not sure, but i think cpanel is using nginx only as a proxy.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - PopAds

Offline

#8 2012-12-19 18:41:09

ful2fun.com
Member
From: India
Registered: 2011-09-16
Posts: 1,038
Website

Re: Configure NGINX

thats correct its using nginx as proxy not using instead of apache.......so as it is proxy and pulgin you need to change vhost settings or http.conf virtual host settings both are same..............




ful2fun.com
livesexpirates.com

Offline

#9 2012-12-20 12:45:31

mario2000
Member
From: Spain
Registered: 2012-05-04
Posts: 190
Website

Re: Configure NGINX

I dont know wher go this code but can help, and the server go realy FAST
This is the anser ho save my day;
-----------------------------------------------------------------------
Hello,
Now FLV is directly working from nginx. Please check your video,
==========
root@MYSERVERNAME [~]# cat /etc/cpnginx/configure.sh
#!/bin/bash
./configure --prefix=/usr/local/nginx \
--with-openssl=/usr/ \
--with-http_realip_module \
--with-http_flv_module \
--with-http_mp4_module
root@MYSERVERNAME [~]# cat /etc/cpnginx/custom/MYDOMAIN.com
location ~* ^.+.(flv)$ {
root /home/MYCPANELUSERNAME/public_html ;
flv;
}
=========


Brutal Porn Videos - Brutal5.org
Peliculas Online - PepeCine
Filme Online Romana - Filme5

Offline

#10 2013-10-14 12:11:13

Vasile
Member
Registered: 2013-06-06
Posts: 7

Re: Configure NGINX

Recommend to use gzip disabled for mp4 streaming, will save some cpu performance:

location ~ \.mp4$ {
  gzip off;
  gzip_static off;
  mp4;
  limit_rate_after 10m;
  limit_rate 1m;
}

Last edited by Vasile (2013-10-14 12:12:51)

Offline

Board footer

Powered by FluxBB