Re: 'auto'rewrite link to a folder

2014-08-14 Thread Pascale Camille
yep you are rigth DNS declaration, so it become standard vhost... i wonder why it did work without A maybe it was not real subdomain : pointing a folder from a volatil url and rewriting this url permanetly... as my little experiment and http://publications.jbfavre.org/web/nginx-vhosts-automatique

Re: Cannot create directory alias (with php pages)

2014-08-14 Thread Francis Daly
On Thu, Aug 14, 2014 at 04:04:47PM +0300, Nikolaos Milas wrote: > On 14/8/2014 3:26 μμ, Francis Daly wrote: Hi there, > I have only decided to set: > >fastcgi_param SCRIPT_FILENAME $request_filename; > > following a suggestion from here: > > > http://blog.martinfjordvald.com/2011/01/no

Re: 'auto'rewrite link to a folder

2014-08-14 Thread Francis Daly
On Thu, Aug 14, 2014 at 04:33:04PM +0200, Pascale Camille wrote: Hi there, > root@www:/# curl -H Host:one.2maxi.com http://localhost/ > content of /tmp/www/one/index.html > root@www:/# curl -H Host:nil.2maxi.com http://localhost/ > > 404 Not Found > > 404 Not Found > nginx/1.2.1 > > > root@ww

Re: add_header is not working in certain locations

2014-08-14 Thread Francis Daly
On Thu, Aug 14, 2014 at 10:16:43AM -0400, bodomic wrote: Hi there, > Actually, the second problem is described in this document too, I think I > should re-read it every time I want to use IF. "if" is fine. It is only "if inside location" which needs care. My general guideline is: do "return .

Re: 'auto'rewrite link to a folder

2014-08-14 Thread Pascale Camille
hi, @bodomic, i just did again and remembered error, in webrowser it rewrote in loop: http://198.23.139.108//www.2maxi.com/www.2maxi.com/www.2maxi.com/www.2maxi.com/www.2maxi.com/www.2maxi.com/www.2maxi.com/www.2maxi.com/www.2maxi.com/www.2maxi.com/www.2maxi.com/www.2maxi.com/www.2maxi.com/www.2max

Re: 'auto'rewrite link to a folder

2014-08-14 Thread bodomic
Hi, you may find this overkill configuration helpful: http://publications.jbfavre.org/web/nginx-vhosts-automatiques-avec-SSL-et-authentification.en Posted at Nginx Forum: http://forum.nginx.org/read.php?2,252553,252577#msg-252577 ___ nginx mailing list

Re: 'auto'rewrite link to a folder

2014-08-14 Thread Pascale Camille
yes i already read month ago but i can not make it work i wrote to the autor, no news :( -- Posted via http://www.ruby-forum.com/. ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: 'auto'rewrite link to a folder

2014-08-14 Thread Pascale Camille
hi, thanks for mini lesson of batch command useful in futur. hum, i did what you wrote i rebuilded vps with debian 7 remove apache just fail to restart nginx editing nginx.conf so i put in /etc/nginx/sites-available/default and i am beat confused: root@www:/# curl -H Host:one.2maxi.com http://loc

Re: add_header is not working in certain locations

2014-08-14 Thread bodomic
Actually, the second problem is described in this document too, I think I should re-read it every time I want to use IF. In my example (before posting it here) I've dropped the second IF in the same location without much thought. That's why it worked for you. That's why it worked in a separate loca

Re: add_header is not working in certain locations

2014-08-14 Thread bodomic
Thanks for your reply, I've actually found the second traitor (i.e. why second example won't work), will reply to Francis's post once more. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,252523,252574#msg-252574 ___ nginx mailing list nginx@n

Re: add_header is not working in certain locations

2014-08-14 Thread itpp2012
Adding a few notes: IF should only be used to return a state, ea. if ... 'error_page' and nothing else because it breaks the chain of processing, when you really need IF's, nested, setting values or otherwise use Lua. For example: http://forum.nginx.org/read.php?2,251650,251777#msg-251777 The prob

Re: Cannot create directory alias (with php pages)

2014-08-14 Thread Nikolaos Milas
On 14/8/2014 3:26 μμ, Francis Daly wrote: The combination of a regex location, alias, and try_files, probably does not do what you want. I suspect that the 404-with-no-error-log comes from this try_files line. Thank you very much Francis, I removed the try_files line and did the modification

Re: add_header is not working in certain locations

2014-08-14 Thread bodomic
Hi Francis, Thanks for your thoughtful entry. It seems that it is a cloudy area of buggy 'if' behaviors :) I've created empty host config with just 'location /' and 'if ... add_header' and proxy_pass - and it works fine. I'll have to retest this situation on my real server though to find out if m

Re: Cannot create directory alias (with php pages)

2014-08-14 Thread Francis Daly
On Thu, Aug 14, 2014 at 02:06:38PM +0300, Nikolaos Milas wrote: > On 13/8/2014 11:42 μμ, Nikolaos Milas wrote: Hi there, > I have modified configuration as follows; the /xprof location works > (i.e. I can access non php files), but all php files cannot be > accessed (message: 404 Not Found). Noth

Re: Cannot create directory alias (with php pages)

2014-08-14 Thread Nikolaos Milas
On 13/8/2014 11:42 μμ, Nikolaos Milas wrote: Now, I want to create an /xhprof location, which includes php code and lives in another disk path (in: /usr/share/xhprof/xhprof_html). I can't make this work... I have modified configuration as follows; the /xprof location works (i.e. I can access

Re: 'auto'rewrite link to a folder

2014-08-14 Thread Francis Daly
On Thu, Aug 14, 2014 at 09:12:39AM +0200, Pascale Camille wrote: Hi there, > i confirmed it used to work greatly > i was working as teacher and needed subdomain easy > create or delete in one minute! > avoiding me to do subdomain process... > (no database site) I don't see how what you provided

full main.conf

2014-08-14 Thread Pascale Camille
server { listen 80; charsetutf-8; source_charset utf-8; server_name www.2maxi.com; root /var/www/www; index 2maxi.com.html index.php; error_page 405 /405.html; location = /405.html { rewrite . http://www.2maxi.com/2maxi.com.gif redirect; allow all; } error_page 4

Re: reverse proxy images - windows

2014-08-14 Thread itpp2012
Francis Daly Wrote: --- > Are there any plans or prospects to get the code changes merged into > the > "authoritative" source? Highly unlikely, more then 2000 lines of new code, mayor changes to the core, 3 integrated api's, I think Igor/Maxim wi

Re: 'auto'rewrite link to a folder

2014-08-14 Thread Pascale Camille
hey! i confirmed it used to work greatly i was working as teacher and needed subdomain easy create or delete in one minute! avoiding me to do subdomain process... (no database site) maybe it need a custom module to be select/unselect at compilation of nginx... -- Posted via http://www.ruby-forum