redirect url in nginx

Marcin Kasiński mkasinski.poczta at gmail.com
Thu Nov 28 12:36:39 UTC 2013


Witam,

Sorry, but solutions that you send to me isn't working. Any more idea's?

Marcin Kasiński
mobile: (+48) 512 - 370 - 209
skype: marcin-kasinski
GG: 1258720
JabberID: marcin-kasinski at aqq.eu
mail: mkasinski.poczta at gmail.com
mail: marcin-kasinski at wp.pl
website: http://markasblog.pl

-----Original Message-----
From: nginx-bounces at nginx.org [mailto:nginx-bounces at nginx.org] On Behalf Of
nginx-request at nginx.org
Sent: Thursday, November 28, 2013 1:00 PM
To: nginx at nginx.org
Subject: nginx Digest, Vol 49, Issue 46

Send nginx mailing list submissions to
	nginx at nginx.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://mailman.nginx.org/mailman/listinfo/nginx
or, via email, send a message with subject or body 'help' to
	nginx-request at nginx.org

You can reach the person managing the list at
	nginx-owner at nginx.org

When replying, please edit your Subject line so it is more specific than
"Re: Contents of nginx digest..."


Today's Topics:

   1. Re: Proxy_pass with decode_base64 result (Jugurtha)
   2. Disable hotlinking protection for specific file !!
      (shahzaib shahzaib)
   3. Re: How can I use IOCP module on windows? (Maxim Dounin)
   4. Re: Disable hotlinking protection for specific file !!
      (Maxim Dounin)
   5. Re: Proxy_pass with decode_base64 result (Francis Daly)
   6. Re: NGINX 500 http error (fatine,al)
   7. Re: NGINX 500 http error (itpp2012)


----------------------------------------------------------------------

Message: 1
Date: Thu, 28 Nov 2013 03:10:37 -0500
From: "Jugurtha" <nginx-forum at nginx.us>
To: nginx at nginx.org
Subject: Re: Proxy_pass with decode_base64 result
Message-ID:
	
<0ae8c1543c99194441b13b7118e6a7d2.NginxMailingListEnglish at forum.nginx.org>
	
Content-Type: text/plain; charset=UTF-8

Hello,

Thank you for the response Francis, I saw this after several searches on the
board but without success.
I will continue my investigations to try to solve this problem.

Thank you for the clue ;)

Merci.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,244811,245035#msg-245035



------------------------------

Message: 2
Date: Thu, 28 Nov 2013 13:16:23 +0500
From: shahzaib shahzaib <shahzaib.cb at gmail.com>
To: nginx at nginx.org
Subject: Disable hotlinking protection for specific file !!
Message-ID:
	<CAD3xhrMCRYeSTZK1LoLU1cYVdxdt_o7P+s0=1WtpgKwZ-4Dmhw at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hello,

       The root directory path is /var/www/html/domain and every file within
it is hotlink protected for  (mp4). Now here's a file named
/var/www/html/domain/videos/test.mp4 and i want this file to be available
for public with no hotlinking restriction. Is that possible with nginx ?
vhost config is given below. Please help me regarding it.

server {
        listen  80;
        server_name  mydomain.com;
        client_max_body_size 800m;
       limit_rate 250k;
        access_log  /websites/theos.in/logs/access.log  main;

        location / {
            root   /var/www/html/domain;
            index index.html index.htm index.php;
           autoindex off;
}

location ~ -720\.(mp4)$ {
                mp4;
                expires 7d;
               limit_rate 1000k;
                root /var/www/html/domain;
                 valid_referers none blocked  test.com *.test.com *.
facebook.com *.twitter.com;
                if ($invalid_referer) {
                    return   403;
                }
                }
location ~ -480\.(mp4)$ {
                mp4;
                expires 7d;
                limit_rate 250k;
                root /var/www/html/domain;
                 valid_referers none blocked  test.com *.test.com *.
facebook.com *.twitter.com;
                if ($invalid_referer) {
                    return   403;
                }
                }
location ~ \.(mp4)$ {
                mp4;
                expires 7d;
                root /var/www/html/domain;
                 valid_referers none blocked  test.com *.test.com *.
facebook.com *.twitter.com;
                if ($invalid_referer) {
                    return   403;
                }
                }


Regards.
Shahzaib
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mailman.nginx.org/pipermail/nginx/attachments/20131128/82bbf790/atta
chment-0001.html>

------------------------------

Message: 3
Date: Thu, 28 Nov 2013 12:53:14 +0400
From: Maxim Dounin <mdounin at mdounin.ru>
To: nginx at nginx.org
Subject: Re: How can I use IOCP module on windows?
Message-ID: <20131128085314.GW93176 at mdounin.ru>
Content-Type: text/plain; charset=us-ascii

Hello!

On Thu, Nov 28, 2013 at 01:48:15AM -0500, pwrlove wrote:

> Hi there,
> 
> Can I use iocp module (ngx_iocp_module.c) ?
> If possible, how can I configure it?
> 
> Could anyone knows about it?

It's incomplete and doesn't work.

--
Maxim Dounin
http://nginx.org/en/donation.html



------------------------------

Message: 4
Date: Thu, 28 Nov 2013 12:55:53 +0400
From: Maxim Dounin <mdounin at mdounin.ru>
To: nginx at nginx.org
Subject: Re: Disable hotlinking protection for specific file !!
Message-ID: <20131128085553.GX93176 at mdounin.ru>
Content-Type: text/plain; charset=us-ascii

Hello!

On Thu, Nov 28, 2013 at 01:16:23PM +0500, shahzaib shahzaib wrote:

> Hello,
> 
>        The root directory path is /var/www/html/domain and every file
> within it is hotlink protected for  (mp4). Now here's a file named
> /var/www/html/domain/videos/test.mp4 and i want this file to be available
> for public with no hotlinking restriction. Is that possible with nginx ?
> vhost config is given below. Please help me regarding it.

Adding an exact match location will help, e.g.:

     location = /test.mp4 {
         # no hotlink protection here
         ...
     }

See http://nginx.org/r/location for details on location matching.

-- 
Maxim Dounin
http://nginx.org/en/donation.html



------------------------------

Message: 5
Date: Thu, 28 Nov 2013 09:09:21 +0000
From: Francis Daly <francis at daoine.org>
To: nginx at nginx.org
Subject: Re: Proxy_pass with decode_base64 result
Message-ID: <20131128090921.GD15722 at craic.sysops.org>
Content-Type: text/plain; charset=us-ascii

On Thu, Nov 28, 2013 at 03:10:37AM -0500, Jugurtha wrote:

Hi there,

> Thank you for the response Francis, I saw this after several searches on
the
> board but without success.
> I will continue my investigations to try to solve this problem.
> 
> Thank you for the clue ;)

You're welcome.

I confess I'm not sure why you're still seeing a problem.

You have "proxy_pass $variable" -- this means you must have a "resolver"
configured which is a DNS server that nginx can use to find the IP address
associated with whatever hostname is included in $variable.

If you don't have a resolver, you get the error message you reported.

If you do have a resolver, you should see success, or a different error
message indicating why it failed.

Good luck with it,

	f
-- 
Francis Daly        francis at daoine.org



------------------------------

Message: 6
Date: Thu, 28 Nov 2013 06:21:49 -0500
From: "fatine,al" <nginx-forum at nginx.us>
To: nginx at nginx.org
Subject: Re: NGINX 500 http error
Message-ID:
	
<56c3928692421282e9f1938dd8a7e758.NginxMailingListEnglish at forum.nginx.org>
	
Content-Type: text/plain; charset=UTF-8

Hi,

The problem is solved.
I installed nginx-1.5.6 and naxsi-core-0.50 from sources, and compile nginx
with naxsi module and some options :

./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx
--conf-path=/etc/nginx/nginx.conf  --lock-path=/var/lock/nginx.lock 
--pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx/error.log 
--http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-scgi-temp-path=/var/lib/nginx/scgi
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-pcre-jit
--with-http_ssl_module --with-debug --with-ipv6
--with-http_stub_status_module
--add-module=../gnosek-nginx-upstream-fair-a18b409/
--add-module=../ngx_cache_purge-2.1
--add-module=../naxsi-core-0.50/naxsi_src/

It works fine now.

Thank you for your help.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,244693,245052#msg-245052



------------------------------

Message: 7
Date: Thu, 28 Nov 2013 06:47:11 -0500
From: "itpp2012" <nginx-forum at nginx.us>
To: nginx at nginx.org
Subject: Re: NGINX 500 http error
Message-ID:
	
<8cb2846812e4dc52b0eba105531f2e9a.NginxMailingListEnglish at forum.nginx.org>
	
Content-Type: text/plain; charset=UTF-8

Note: --add-module=../naxsi... should be the first one.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,244693,245053#msg-245053



------------------------------

_______________________________________________
nginx mailing list
nginx at nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

End of nginx Digest, Vol 49, Issue 46
*************************************



More information about the nginx mailing list