Welcome! Log In Create A New Profile

Advanced

Re: Custom configuration

All files from this thread

File Name File Size   Posted by Date  
Capture =?utf-8?Q?d=E2=80=99e=CC=81cran_?=2012-03-31 =?utf-8?Q?a=CC=80_?=01.34.16.png 29.2 KB open | download Adnan RIHAN 03/30/2012 Read message
Adnan RIHAN
March 28, 2012 07:08PM
@Cliff: Here is the customer's vhost:

> root@shadow [/etc/cpnginx/custom]# cat /usr/local/nginx/conf/vhost.conf | grep domain.com
> ########### Vhost configuration of mega-sound.be
> server_name domain.com www.domain.com;
> access_log /usr/local/apache/domlogs/domain.com;
> proxy_redirect http://www.domain.com:8888 http://www.mega-sound.be;
> proxy_redirect http://domain.com:8888 http://domain.com;
> proxy_redirect http://domain.com:8888 http://domain.com;
> include "/etc/cpnginx/custom/domain.com";




@locojohn: Here is the custom file:

> root@shadow [/etc/cpnginx/custom]# cat domain.com
> location ~ /(?<filename>(?!/).+\.mp3)$ {
> types {
> application/octet-stream mp3;
> }
> add_header Content-Disposition "attachment; filename=\"$filename\"";
> }




@locojohn: I'm using your custom config :/ . Plus, here is my nginx -V:

> root@shadow [/etc/cpnginx/custom]# /usr/local/nginx/sbin/nginx -V
> nginx version: nginx/1.0.11
> built by gcc 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
> configure arguments: --prefix=/usr/local/nginx --with-openssl=/usr/


When I access a .mp3, here is the answer:

> HTTP/1.1 200 OK
> Server: nginx
> Date: Wed, 28 Mar 2012 23:06:25 GMT
> Content-Type: audio/mpeg
> Content-Length: 8976405
> Last-Modified: Mon, 26 Mar 2012 18:50:14 GMT
> Connection: keep-alive
> Expires: Thu, 29 Mar 2012 23:06:25 GMT
> Cache-Control: max-age=86400
> Accept-Ranges: bytes



Thank you for your help.


---
Cordialement, Adnan RIHAN.
Président-Fondateur de l'association (de loi 1901) Virtual-Info (http://www.virtual-info.info/), hébergeur Web et Serveurs de Jeux.
Consultant (http://rihan.fr/)-Technicien Supérieur en Informatique de Gestion.
Ambassadeur Qt (http://lyt.me/7E) (Projet Tag-PG (http://rihan.fr/fr/projets/tagpg)).


Le jeudi 29 mars 2012 à 00:57, locojohn a écrit :

> > Sorry but, what do you mean? Isn't "headers" a standard module ? How
>
> to check the compiled modules please ?
>
> nginx -V
>
> Try my solution, it works for me.
>
> Andrejs
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,224499,224582#msg-224582
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org (mailto:nginx@nginx.org)
> http://mailman.nginx.org/mailman/listinfo/nginx
>
>


_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Custom configuration

Adnan RIHAN March 27, 2012 05:48PM

Re: Custom configuration

Cliff Wells March 27, 2012 06:16PM

Re: Custom configuration

Adnan RIHAN March 28, 2012 01:18AM

Re: Custom configuration

Cliff Wells March 28, 2012 02:04AM

Re: Custom configuration

Adnan RIHAN March 28, 2012 03:50AM

Re: Custom configuration

Adnan RIHAN March 28, 2012 12:12PM

Re: Custom configuration

Cliff Wells March 28, 2012 01:16PM

Re: Custom configuration

locojohn March 28, 2012 02:31PM

Re: Custom configuration

Adnan RIHAN March 28, 2012 06:52PM

Re: Custom configuration

locojohn March 28, 2012 06:57PM

Re: Custom configuration

Adnan RIHAN March 28, 2012 07:08PM

Re: Custom configuration

locojohn March 28, 2012 07:15PM

Re: Custom configuration

Adnan RIHAN March 28, 2012 07:22PM

Re: Custom configuration

Cliff Wells March 28, 2012 08:16PM

Re: Custom configuration

Adnan RIHAN March 28, 2012 08:38PM

Re: Custom configuration

Adnan RIHAN March 30, 2012 01:10AM

Re: Custom configuration

Adnan RIHAN March 30, 2012 03:12AM

Re: Custom configuration

Francis Daly March 30, 2012 04:38AM

Re: Custom configuration

Adnan RIHAN March 30, 2012 11:46AM

Re: Custom configuration

Francis Daly March 30, 2012 02:16PM

Re: Custom configuration Attachments

Adnan RIHAN March 30, 2012 07:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 276
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready