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 30, 2012 03:12AM
Hey everybody !

Here are some news.
I've compiled nginx with HttpHeadersMoreModule (http://wiki.nginx.org/NginxHttpHeadersMoreModule), to add custom headers in order to see if the location is or isn't matched.

Here is what I tried:
URL: http://www.mega-sound.be/adata/428.mp3
Custom config file:

> root@shadow [/etc/cpnginx/custom]# cat mega-sound.be
> location ~* \.mp3$ {
> more_set_headers 'X-MyHeader: .mp3';
> }
>
> location /adata {
> more_set_headers 'X-MyHeader: adata';
> }
>
> more_set_headers 'X-MyMasterHeader: set';


The headers sent:

> GET /adata/428.mp3 HTTP/1.1
> Host: www.mega-sound.be
> User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20100101 Firefox/11.0
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
> Accept-Encoding: gzip, deflate
> Connection: keep-alive
> Referer: http://www.mega-sound.be/
> Cookie: cookie-data
> If-Modified-Since: Mon, 26 Mar 2012 18:50:14 GMT
> Cache-Control: max-age=0


And received



> HTTP/1.1 200 OK
> Server: nginx
> Date: Fri, 30 Mar 2012 07:03:58 GMT
> Content-Type: audio/mpeg
> Content-Length: 8976405
> Last-Modified: Mon, 26 Mar 2012 18:50:14 GMT
> Connection: keep-alive
> X-MyMasterHeader: set
> Expires: Sat, 31 Mar 2012 07:03:58 GMT
> Cache-Control: max-age=86400
> Accept-Ranges: bytes


Do you have an idea :/ ?
Thank you for your help.


---
Cheers, 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 vendredi 30 mars 2012 à 07:08, Adnan RIHAN a écrit :

> Hi,
>
> Finally I need your help :/
>
> The "CPNginx" devs have a website with a ticket support system, but they're telling me that they don't support custom configuration...
> I've told them I need their help because they know how they built their module and how they made it work, they still just answer "You need to do it by yourself"...
>
> What can I do T_T ?
> ---
> Regards, 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 à 02:36, Adnan RIHAN a écrit :
>
> > Mmmh...
> >
> > Ok. I see, maybe there will never be any match, as there is only "proxy_redirect" in vhosts;
> > > ########### Vhost configuration of mega-sound.be (http://mega-sound.be)
> > > server_name mega-sound.be (http://mega-sound.be) www.mega-sound.be (http://www.mega-sound.be);
> > > access_log /usr/local/apache/domlogs/mega-sound.be (http://mega-sound.be);
> > > proxy_redirect http://www.mega-sound.be:8888 http://www.mega-sound.be;
> > > proxy_redirect http://mega-sound.be:8888 http://mega-sound.be;
> > > proxy_redirect http://mega-sound.be:8888 http://mega-sound.be;
> > > include "/etc/cpnginx/custom/mega-sound.be (http://mega-sound.be)";
> > >
> >
> >
> > Apache is still listening on :8888
> > Is there a chance with this conf, to match any "location" as there is no "document_root" or equivalent ?
> > I mean, location is system based or URL based?
> >
> > If it's system, I don't know. If it's URL based, there should be a match since the first test.
> > Isn't it ?
> > ---
> > 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 à 02:15, Cliff Wells a écrit :
> >
> > > On Wed, 2012-03-28 at 19:15 -0400, locojohn wrote:
> > > > Adnan, if it doesn't set the "Content-Disposition" header as per my
> > > > example, then it doesn't match the location in which this header is set.
> > > > It is likely that some other location has preference and so the code I
> > > > provided will never be triggered.
> > > >
> > >
> > >
> > > I'm fairly certain this is exactly what is happening. Either solution
> > > should work fine, but only if the location is properly matched.
> > >
> > > Again, it's not the preferred solution, but directly editing mime.types
> > > would probably work.
> > >
> > > Cliff
> > >
> > > _______________________________________________
> > > 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: 91
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready