<div>
                    Sorry but, did I paste enough config files ?
                </div><div><br></div><div>Is there an error ? :/</div><div><div>---<br>Regards, Adnan RIHAN.<br>
<u>Président</u>-<u>Fondateur</u> de l'association (de loi 1901) <a href="http://www.virtual-info.info/" target="_blank"><b>Virtual-Info</b></a>, <i>hébergeur Web et Serveurs de Jeux</i>.<br>
<a href="http://rihan.fr/" target="_blank"><u>Consultant</u></a>-<u>Technicien Supérieur</u> en <i>Informatique de Gestion</i>.<br><u>Ambassadeur</u> <a href="http://lyt.me/7E" target="_blank"><b>Qt</b></a> (Projet <a href="http://rihan.fr/fr/projets/tagpg" target="_blank"><b>Tag-PG</b></a>).<u><br></u></div><div><br></div></div>
                 
                <p style="color: #A0A0A8;">Le mercredi 28 mars 2012 à 09:48, Adnan RIHAN a écrit :</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div>
                <div>I'm actually using NGinx as webserver, for a hosting service, with CPanel. CPNginx, the name of the module.</div><div><br></div><div><blockquote type="cite"><div><div>root@shadow [/etc/cpnginx]# ls</div><div>./                data.conf           localkey.txt         <a href="http://uninstall.sh">uninstall.sh</a></div><div>../               direct/             md5.txt              version.txt</div><div>cpanelproxy.conf  expires/            nginx.cont.template  vhost.conf</div><div>custom/           fileextensions.txt  php.ini</div></div><div><div>root@shadow [/etc/cpnginx]# cat cpanelproxy.conf </div><div>###### Security ########</div><div>server_tokens  off; </div><div><br></div><div>###### To redirect <a href="http://cpanel.yourdomain.com">cpanel.yourdomain.com</a> ###########################3</div><div><br></div><div>server {</div><div>access_log off;</div><div>error_log  logs/vhost-error_log warn;</div><div>listen    80;</div><div>server_name  cpanel.* <a href="http://www.cpanel">www.cpanel</a>.*;</div><div>location / {</div><div>        client_max_body_size    10m;</div><div>        client_body_buffer_size 128k;</div><div>        proxy_send_timeout   90;</div><div>        proxy_read_timeout   90;</div><div>        proxy_buffer_size    4k;</div><div>        proxy_buffers     16 32k;</div><div>        proxy_busy_buffers_size 64k;</div><div>        proxy_temp_file_write_size 64k;</div><div>        proxy_connect_timeout 30s;</div><div>        proxy_redirect  <a href="http://www.cpanel">http://www.cpanel</a>.*:8888   <a href="http://www.cpanel">http://www.cpanel</a>.*;</div><div>        proxy_redirect  <a href="http://cpanel">http://cpanel</a>.*:8888   <a href="http://cpanel">http://cpanel</a>.*;</div><div>        proxy_pass   <a href="http://127.0.0.1:2082">http://127.0.0.1:2082</a>/;</div><div>        proxy_set_header   Host   $host;</div><div>        proxy_set_header   X-Real-IP  $remote_addr;</div><div>        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;</div><div>        }</div><div><br></div><div>}</div><div>################# To redirect <a href="http://whm.yourdomain.com">whm.yourdomain.com</a> #####################</div><div>server {</div><div>access_log off;</div><div>error_log  logs/vhost-error_log warn;</div><div>listen    80;</div><div>server_name  whm.* <a href="http://www.whm">www.whm</a>.*;</div><div>location / {</div><div>        client_max_body_size    10m;</div><div>        client_body_buffer_size 128k;</div><div>        proxy_send_timeout   90;</div><div>        proxy_read_timeout   90;</div><div>        proxy_buffer_size    4k;</div><div>        proxy_buffers     16 32k;</div><div>        proxy_busy_buffers_size 64k;</div><div>        proxy_temp_file_write_size 64k;</div><div>        proxy_connect_timeout 30s;</div><div>        proxy_redirect  <a href="http://www.whm">http://www.whm</a>.*:8888   <a href="http://www.whm">http://www.whm</a>.*;</div><div>        proxy_redirect  <a href="http://whm">http://whm</a>.*:8888   <a href="http://whm">http://whm</a>.*;</div><div>        proxy_pass   <a href="http://127.0.0.1:2086">http://127.0.0.1:2086</a>/;</div><div>        proxy_set_header   Host   $host;</div><div>        proxy_set_header   X-Real-IP  $remote_addr;</div><div>        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;</div><div>        }</div><div><br></div><div>}</div><div>######### To redirect  <a href="http://webmail.yourdomain.com">webmail.yourdomain.com</a> ##################</div><div>server {</div><div>access_log off;</div><div>error_log  logs/vhost-error_log warn;</div><div>listen    80;</div><div>server_name  webmail.* <a href="http://www.webmail">www.webmail</a>.*;</div><div>location / {</div><div>        client_max_body_size    10m;</div><div>        client_body_buffer_size 128k;</div><div>        proxy_send_timeout   90;</div><div>        proxy_read_timeout   90;</div><div>        proxy_buffer_size    4k;</div><div>        proxy_buffers     16 32k;</div><div>        proxy_busy_buffers_size 64k;</div><div>        proxy_temp_file_write_size 64k;</div><div>        proxy_connect_timeout 30s;</div><div>        proxy_redirect  <a href="http://www.webmail">http://www.webmail</a>.*:8888   <a href="http://www.webmail">http://www.webmail</a>.*;</div><div>        proxy_redirect  <a href="http://webmail">http://webmail</a>.*:8888   <a href="http://webmail">http://webmail</a>.*;</div><div>        proxy_pass   <a href="http://127.0.0.1:2095">http://127.0.0.1:2095</a>/;</div><div>        proxy_set_header   Host   $host;</div><div>        proxy_set_header   X-Real-IP  $remote_addr;</div><div>        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;</div><div>        }</div><div><br></div><div>}</div><div>############# To redirect <a href="http://webdisk.yourdomain.com">webdisk.yourdomain.com</a> ##################</div><div>server {</div><div>access_log off;</div><div>error_log  logs/vhost-error_log warn;</div><div>listen    80;</div><div>server_name  webdisk.* <a href="http://www.webdisk">www.webdisk</a>.*;</div><div>location / {</div><div>        client_max_body_size    10m;</div><div>        client_body_buffer_size 128k;</div><div>        proxy_send_timeout   90;</div><div>        proxy_read_timeout   90;</div><div>        proxy_buffer_size    4k;</div><div>        proxy_buffers     16 32k;</div><div>        proxy_busy_buffers_size 64k;</div><div>        proxy_temp_file_write_size 64k;</div><div>        proxy_connect_timeout 30s;</div><div>        proxy_redirect  <a href="http://www.webdisk">http://www.webdisk</a>.*:8888   <a href="http://www.webdisk">http://www.webdisk</a>.*;</div><div>        proxy_redirect  <a href="http://webdisk">http://webdisk</a>.*:8888   <a href="http://webdisk">http://webdisk</a>.*;</div><div>        proxy_pass   <a href="http://127.0.0.1:2077">http://127.0.0.1:2077</a>/;</div><div>        proxy_set_header   Host   $host;</div><div>        proxy_set_header   X-Real-IP  $remote_addr;</div><div>        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;</div><div>        }</div><div><br></div><div>}</div><div>################### WHM report #################################################</div><div>server {</div><div><span style="white-space:pre">        </span>error_log  logs/vhost-error_log warn;</div><div><span style="white-space:pre">    </span>listen    80;</div><div><span style="white-space:pre">       </span>location /whm-server-status {</div><div>                access_log /usr/local/apache/logs/access_log;</div><div>                proxy_pass <a href="http://127.0.0.1:8888/whm-server-status">http://127.0.0.1:8888/whm-server-status</a>;</div><div>                proxy_set_header   Host   $host;</div><div>                proxy_set_header   X-Real-IP  $remote_addr;</div><div>                proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;</div><div><span style="white-space:pre">        </span>}</div><div>} </div></div></blockquote></div>
                <div><div><blockquote type="cite"><div><div>root@shadow [/etc/cpnginx]# cat nginx.cont.template </div><div># cPanel Nginx Master configuration</div><div>user  nobody;</div><div>error_log  logs/error.log;</div><div>#Number of worker you need</div><div>worker_processes  1;</div><div># How many connections a worker can handle maximum.</div><div>events {</div><div>    worker_connections  50000;</div><div>}</div><div>http {</div><div><span style="white-space:pre">  </span>include    mime.types;</div><div> <span style="white-space:pre">        </span>default_type  application/octet-stream;</div><div> <span style="white-space:pre">    </span>sendfile on;</div><div><span style="white-space:pre">  </span>server_names_hash_max_size 10000;</div><div>        server_names_hash_bucket_size 1024;</div><div> <span style="white-space:pre"> </span>tcp_nopush on;</div><div> <span style="white-space:pre">  </span>tcp_nodelay on;</div><div> <span style="white-space:pre"> </span>keepalive_timeout  10;</div><div> <span style="white-space:pre">     </span>gzip on;</div><div> <span style="white-space:pre">        </span>gzip_min_length  1100;</div><div> <span style="white-space:pre">     </span>gzip_buffers  4 32k;</div><div> <span style="white-space:pre">       </span>gzip_types    text/plain  application/x-javascript text/xml text/css;</div><div> <span style="white-space:pre">    </span>ignore_invalid_headers on;</div><div> <span style="white-space:pre">      </span>client_header_timeout  3m;</div><div> <span style="white-space:pre"> </span>client_body_timeout 3m;</div><div> <span style="white-space:pre"> </span>send_timeout     3m;</div><div> <span style="white-space:pre">  </span>include "/usr/local/nginx/conf/vhost.conf";</div><div> <span style="white-space:pre">   </span>include "/etc/cpnginx/cpanelproxy.conf";</div><div>}</div></div></blockquote></div><div>And finally</div><div><blockquote type="cite"><div><div>root@shadow [/etc/cpnginx]# cat vhost.conf </div><div>client_max_body_size    2000m;</div><div>client_body_buffer_size 512k;</div><div>proxy_send_timeout   90;</div><div>proxy_read_timeout   90;</div><div>proxy_buffer_size    32k;</div><div>proxy_buffers     16 32k;</div><div>proxy_busy_buffers_size 64k;</div><div>proxy_temp_file_write_size 64k;</div><div>proxy_connect_timeout 30s;</div></div></blockquote><div>In custom, there is only one file, containing the previous posted config.</div><div><br></div><div>Thanks for your help. </div></div><div>---<br>Ragards, Adnan RIHAN.<br>
<u>Président</u>-<u>Fondateur</u> de l'association (de loi 1901) <a href="http://www.virtual-info.info/" target="_blank"><b>Virtual-Info</b></a>, <i>hébergeur Web et Serveurs de Jeux</i>.<br>
<a href="http://rihan.fr/" target="_blank"><u>Consultant</u></a>-<u>Technicien Supérieur</u> en <i>Informatique de Gestion</i>.<br><u>Ambassadeur</u> <a href="http://lyt.me/7E" target="_blank"><b>Qt</b></a> (Projet <a href="http://rihan.fr/fr/projets/tagpg" target="_blank"><b>Tag-PG</b></a>).<u><br></u></div><div><br></div></div>
                  
                <p style="color: #A0A0A8;">Le mercredi 28 mars 2012 à 08:02, Cliff Wells a écrit :</p><blockquote type="cite"><div>
                    <span><div><div><div>On Wed, 2012-03-28 at 07:16 +0200, Adnan RIHAN wrote:</div><blockquote type="cite"><div><div>I've done this: </div><div><br></div><blockquote type="cite"><div><div>root@shadow [/etc/cpnginx/custom]# cat <a href="http://mega-sound.be">mega-sound.be</a> </div><div>location ~* \.mp3$ {</div><div>types {</div><div>application/octet-stream mp3;</div><div>}</div><div>}</div></div></blockquote><div><br></div><div>But, after rebuilding vhost and restarted nginx, the mp3 are currently</div><div>audio/mpeg (referring to firefox).</div><div>Is there a way to check if the config is correctly "set" ?</div></div></blockquote><div><br></div><div>Start by posting more of your configuration. </div><div><br></div><div>Cliff</div><div><br></div><div><br></div><div><br></div><div>_______________________________________________</div><div>nginx mailing list</div><div><a href="mailto:nginx@nginx.org">nginx@nginx.org</a></div><div><a href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></div></div></div></span>
                  
                  
                  
                  
                </div></blockquote><div>
                    <br>
                </div>
            </div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>