RE: Documentation for alias directive

2020-01-30 Thread Reinis Rozitis
> I struggled with using the alias directive because I (incorrectly) assumed > that it was relative to root since all other parts of my nginx configs are. > This is not mentioned in the documentation, it'd be nice to see it there. Well it's not directly worded but you can (s

Documentation for alias directive

2020-01-29 Thread slowgary
I hope this is the appropriate place to report this. I struggled with using the alias directive because I (incorrectly) assumed that it was relative to root since all other parts of my nginx configs are. This is not mentioned in the documentation, it'd be nice to see it there. If I'm

Re: nginx sends 301 redirect for alias in location

2018-09-05 Thread Peter Volkov
> server_name test.domain.tv <http://test.m9.smotreshka.tv>; > > > > access_log off; > > > > location = /test/README.txt { > > alias /var/www/; > > } > > } > > > > Here is redirect: > > > > $ http http://te

Re: nginx sends 301 redirect for alias in location

2018-09-05 Thread Maxim Dounin
> > access_log off; > > location = /test/README.txt { > alias /var/www/; > } > } > > Here is redirect: > > $ http http://test.domain.tv/test/README.txt > HTTP/1.1 301 Moved Permanently > Connection: keep-alive > Content-Length: 178 > Conte

nginx sends 301 redirect for alias in location

2018-09-04 Thread Peter Volkov
Hi. Could you, please, explain. Why nginx sends 301 redirect for the following vhost: server { listen 80; server_name test.domain.tv <http://test.m9.smotreshka.tv>; access_log off; location = /test/README.txt { alias /var/www/; } } Here is redirect: $ htt

Re: Getting NGINX to view an alias

2018-08-08 Thread Francis Daly
On Tue, Jul 31, 2018 at 12:49:31AM -0700, Gregory Schultz wrote: Hi there, > I'm new at NGINX and I'm having difficulty in setting up to read an alias. alias should work per its documentation (http://nginx.org/r/alias), or else there is a significant bug. What I suspect is happ

Getting NGINX to view an alias

2018-07-31 Thread Gregory Schultz
Hi, I'm new at NGINX and I'm having difficulty in setting up to read an alias. I'm setting up adminer on NGINX to use an alias to see a file outside of it's main directory. The file is called latest.php in /usr/share/adminer. I created a synlink to link adminer.php to lates

Re: Convert Alias from apache (totally different root)

2017-06-07 Thread Francis Daly
On Tue, Jun 06, 2017 at 06:37:45PM -0400, ianwinter wrote: Hi there, > I've read the docs and understand how root and alias work within a location, > but, neither can be used to convert what I've got in apache that I can see. > > Take the example `Alias /media /path/to/

Re: Convert Alias from apache (totally different root)

2017-06-07 Thread ianwinter
I think a location elsewhere (with deny/allow's) had been causing issues. I'm going to start from scratch on the server block and build it up slowly. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274717,274728#msg-274728 ___ nginx mailing l

Convert Alias from apache (totally different root)

2017-06-06 Thread ianwinter
I've read the docs and understand how root and alias work within a location, but, neither can be used to convert what I've got in apache that I can see. Take the example `Alias /media /path/to/assets` in apache, the location and path are completely different (media doesn't form any

Re: Questions about root and alias directives

2017-01-20 Thread Valentin V. Bartenev
... > > } > > Now, when I request "http://www.example.com/museum/";, the above config > produces a request for the following path: > > /var/webs/wwwmuseum/museum/index.php > > I think this is the expected result, according to the documentation.

Questions about root and alias directives

2017-01-20 Thread Nikolaos Milas
his is the expected result, according to the documentation. If I change the last part to use an alias directive: location /museum/ { alias /var/webs/wwwmuseum/; } then the evaluated path becomes: /var/webs/wwwmain/www/museum/index.html The alias directive does not se

Re: Alias or root directive

2016-11-03 Thread Francis Daly
On Thu, Nov 03, 2016 at 07:26:01PM +0100, Daniel wrote: Hi there, > As i understand the Documentation correct then my entry is correct: > > location /en/holidays/shared/images/ { > alias /mnt/nfs/uat/; > } Yes, that should work. So long as this lo

Re: Alias or root directive

2016-11-03 Thread Daniel
> > If you check your error_log, you should see an indication of what file > nginx tried to serve, if it failed. > Yes it tries to open the doc_root to open that file and this is totally wrong of course because this file is placed on /mnt/nfs/uat/guide/germany/berlin.jpg /var/www/d1/current/we

Re: Alias or root directive

2016-11-03 Thread Daniel
As i understand the Documentation correct then my entry is correct: location /en/holidays/shared/images/ { alias /mnt/nfs/uat/; } Anyways, when i try to use root instead of alias it has same result. Its getting ignored completely in the config. > Am 03.11.2

Re: Alias or root directive

2016-11-03 Thread Francis Daly
u want nginx to serve in response to > > that request? > > on /mnt/nfs/uat/ are the folders like guides/germany/ "alias" replaces the bit in the location with the bit in the alias, and uses the result as the filename to serve. So try: location ^~ /en/holidays/shared/images/

Re: Alias or root directive

2016-11-03 Thread Daniel
file on your filesystem do you want nginx to serve in response to > that request? > on /mnt/nfs/uat/ are the folders like guides/germany/ >>location ~ ^/en/holidays/shared/images { >>root /mnt/nfs/uat/; >>} >> >> When i repl

Re: Alias or root directive

2016-11-03 Thread Francis Daly
o that request? > location ~ ^/en/holidays/shared/images { > root /mnt/nfs/uat/; > } > > When i replace root with alias it has also no effect :-( "alias" in a regex location has special requirements. http://nginx.org/r/alias Cheers,

Alias or root directive

2016-11-03 Thread Daniel
Hi there, i try to add a images folder but seems not work. Could someone tell me what i am doing wrong: location ~ ^/en/holidays/shared/images { root /mnt/nfs/uat/; } When i replace root with alias it has also no effect :-( Cheers Daniel

alias

2016-10-24 Thread Daniel
hi there, i try to setup a Alias but it seems not working and i didnt know why: server { listen 80; root /var/www/d1/current/web/; server_name localhost; location / { index app.php; add_header Access-Control-Allow-Headers "Orig

Re: Location Alias not working

2016-08-28 Thread Francis Daly
o.bar.com; > root /usr/local/www/foo/bar; > index index.php index.html; > location / { > location ~ ^(.+?\.php)(/.*)?$ { > try_files $1 = 404; > location /foo/ { > alias /var/www/foo/; > } The request for /foo/ is h

Re: Location Alias not working

2016-08-28 Thread Edho Arief
Hi, On Mon, Aug 29, 2016, at 01:59, İhsan Doğan wrote: > Hi, > > On Saturday, 27 Aug 2016 21:50 +0100, Francis Daly wrote: > > > > I've defined a location alias in my nginx.conf: > > > > > location/foo/ { > > >

Re: Location Alias not working

2016-08-28 Thread İhsan Doğan
Hi, On Saturday, 27 Aug 2016 21:50 +0100, Francis Daly wrote: > > I've defined a location alias in my nginx.conf: > > > location/foo/ { > > alias /var/www/foo/; > > } > > > Even the directory /var/www/foo exists, Ng

Re: Location Alias not working

2016-08-27 Thread Francis Daly
On Sat, Aug 27, 2016 at 11:18:04PM +0200, Andrew Holway wrote: Hi there, > Can you post your full config pls? == server { listen 8080; server_name x1; location /foo/ { alias /var/www/foo/; } } == curl -v -H Host:x1 http://127.0.0.1:8080/foo/a gives a 200 with

Re: Location Alias not working

2016-08-27 Thread Andrew Holway
Hi Francis, Can you post your full config pls? Thanks, Andrew On Sat, Aug 27, 2016 at 10:50 PM, Francis Daly wrote: > On Sat, Aug 27, 2016 at 10:38:27AM +0200, İhsan Doğan wrote: > > Hi there, > > > I've defined a location alias in my nginx.conf: > >

Re: Location Alias not working

2016-08-27 Thread Francis Daly
On Sat, Aug 27, 2016 at 10:38:27AM +0200, İhsan Doğan wrote: Hi there, > I've defined a location alias in my nginx.conf: > location/foo/ { > alias /var/www/foo/; > } > Even the directory /var/www/foo exists, Nginx is returns a 40

Location Alias not working

2016-08-27 Thread İhsan Doğan
Hi, I've defined a location alias in my nginx.conf: server { listen 80; server_name example.org www.example.org; [...] location/foo/ { alias /var/www/foo/; } } Even the directory /var/www/foo exists, Ngi

alias to server_ip/drupal

2016-05-30 Thread gacek
Hello, i am rather new to the nginx and i have a trobule with alias from my default page (http://server_IP/) to the Drupal (http://server_IP/drupal). I got the error message: 404 Not Found. I have no idea what is wrong and i didn't find anything with google either. Thanks for your help. Thes

Re: hide/strip set cookies on static files and howto use alias

2016-04-10 Thread Francis Daly
On Sat, Apr 09, 2016 at 09:16:33AM -0400, JoakimR wrote: Hi there, > Another Q For ease of searching in future, it probably will be simpler if new unrelated questions start new message threads, with a Subject: line that is relevant. > Hi do have this in my domain.conf > > location /admin {

Re: hide/strip set cookies on static files and howto use alias

2016-04-09 Thread JoakimR
Hi Francis, and of course everyone else Another Q Hi do have this in my domain.conf location /admin { index index.php; access_log off; log_not_found off; expires 0; } but yet, everythin

Re: hide/strip set cookies on static files and howto use alias

2016-04-08 Thread Francis Daly
On Fri, Apr 08, 2016 at 05:06:19AM -0400, JoakimR wrote: Hi there, > Hi Francis Daly thank you very much for your reply You're welcome. > Let's brake this down one by one. I followed you suggestion and added > fastcgi_connect_timeout 600s; to the conf, however the pages still time out > after ~

Re: hide/strip set cookies on static files and howto use alias

2016-04-08 Thread JoakimR
Hi Francis Daly thank you very much for your reply Let's brake this down one by one. I followed you suggestion and added fastcgi_connect_timeout 600s; to the conf, however the pages still time out after ~75 sec as expected do to this http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastc

Re: hide/strip set cookies on static files and howto use alias

2016-04-05 Thread Francis Daly
ere does the "Set-Cookie" header come from? Default nginx does not add it. Can you create a small configuration which shows the problem? Copy-paste the configuration and a "curl -v" request and response to show the Set-Cookie header; that should make it more obvious what needs

hide/strip set cookies on static files and howto use alias

2016-04-04 Thread JoakimR
, just to reverse to your self and add a few hundred msec to the request. Second question: I'm trying to make an alias to hide a folder in the lookup to the subfolder, the structure is: /var/www/domain.tld/media/ads /var/www/domain.tld/media/galleries /var/www/domain.tld/media/misc /var/ww

Re: root and alias with php5-fpm

2015-09-09 Thread Francis Daly
On Tue, Sep 08, 2015 at 09:23:08AM -0500, Kristofer Pettijohn wrote: Hi there, > When I do that, and use "root" instead of "alias" inside of > "location /grant", it works. However, inside of the path I need to > create a symlink "ln -s . grant/&

Re: root and alias with php5-fpm

2015-09-08 Thread Kristofer Pettijohn
what you want. When I do that, and use "root" instead of "alias" inside of "location /grant", it works. However, inside of the path I need to create a symlink "ln -s . grant/" with how the root directive looks for any static files. This is the part I a

Re: root and alias with php5-fpm

2015-09-08 Thread Francis Daly
On Mon, Sep 07, 2015 at 06:48:57PM -0500, Kristofer Pettijohn wrote: Hi there, > > I suggest using a named location for handling the "not there" fallback > > -- either as the final argument to try_files, or perhaps as "error_page > > 404 = @fallback". > > > > Then > > > > location @fallback {

Re: root and alias with php5-fpm

2015-09-07 Thread Kristofer Pettijohn
Thanks for the response. > I suggest using a named location for handling the "not there" fallback > -- either as the final argument to try_files, or perhaps as "error_page > 404 = @fallback". > > Then > > location @fallback { >fastcgi_param SCRIPT_FILENAME /apps/grant/index.php; >includ

Re: root and alias with php5-fpm

2015-09-07 Thread Francis Daly
On Mon, Sep 07, 2015 at 11:23:32AM -0500, Kristofer Pettijohn wrote: Hi there, > I just want each location in each > server to see /apps/grant/ as the root, and for try_files to process > the index.php file in the base of that location last. If I've understood you correctly, what you describe is

Re: root and alias with php5-fpm

2015-09-07 Thread Kristofer Pettijohn
Is this the issue I might be experiencing when I try to use the alias directive? https://trac.nginx.org/nginx/ticket/97 > On Sep 7, 2015, at 11:23 AM, Kristofer Pettijohn > wrote: > > I am having a difficult time finding a solution for this. > > I have PHP applications that

root and alias with php5-fpm

2015-09-07 Thread Kristofer Pettijohn
" and "try_files". However, I know that "root" will append the URI to the path, so it will try /apps/grant/grant/ and /apps/grant/employ/ when looking for files. When I use "alias", it seems that try_files tries looking for index.php in the context of "loca

Re: Alias regex use causing core dump as of nginx 1.7.1

2015-07-27 Thread Per Hansson
Thanks Maxim, you are correct about not making the /mail location a regex, it solves the problem. As for the core dump I compiled v1.9.3 with your patch and can confirm it no longer crashes with the original config. But as you suspected the config anyway does not work without removing the regex for

Re: Alias regex use causing core dump as of nginx 1.7.1

2015-07-26 Thread Maxim Dounin
Hello! On Sun, Jul 26, 2015 at 10:25:19AM -0400, Per Hansson wrote: > Hi, after upgrading from the v1.6.3 to v1.8.0 stable branch an alias I used > for Roundcubemail no longer works. > I traced the issue back to a probable change made in nginx v1.7.1: > "Bugfix: the "alias&

Alias regex use causing core dump as of nginx 1.7.1

2015-07-26 Thread Per Hansson
Hi, after upgrading from the v1.6.3 to v1.8.0 stable branch an alias I used for Roundcubemail no longer works. I traced the issue back to a probable change made in nginx v1.7.1: "Bugfix: the "alias" directive used inside a location given by a regular expression worked incorrectly

Re: Understanding alias (used as rewrite)

2015-06-27 Thread E.B.
> > i guess this was a security > > measure to prevent sneaking around the > > filesystem for php requests. > > I confess I've never been quite sure of the point of that line. > > I can see what it does, and I think that it might be useful in some > limited circumstances which include "...and my ph

Re: Understanding alias (used as rewrite)

2015-06-25 Thread Francis Daly
;s probably fine. But for a general solution, you'll want to make sure that you are clear about what "served to the same file" means. If it is "serve a file from filesystem", then alias and/or try_files may be useful. If it is "send to an upstream such as via fastcgi_pas

Re: Understanding alias (used as rewrite)

2015-06-24 Thread E.B.
First big appreciated to you and Edho for helping!! Especially for things not documented . :) > you seem to keep referring to "alias used as rewrite". I do not know > what you mean by that. > > Could you explain? Sure I wanted to take a prefix: /my-long-base-path and m

Re: Understanding alias (used as rewrite)

2015-06-24 Thread E.B.
> >> This config works for me. > >> > >> location ~ ^/test { > >> alias /data/public_html/somefile.php; > >> > >> include fastcgi.conf; > >> > >> fastcgi_pass 127.0.0.1:8900; > >> } > > > >

Re: Understanding alias (used as rewrite)

2015-06-24 Thread Francis Daly
On Tue, Jun 23, 2015 at 11:44:33PM -0700, E.B. wrote: Hi there, > Thanks for your ongoing helps! I hope someone > can advise further you seem to keep referring to "alias used as rewrite". I do not know what you mean by that. Could you explain? When you do, it may be that

Re: Understanding alias (used as rewrite)

2015-06-24 Thread Edho Arief
; > >> > Excellent point! Thanks you! >> > However, what if the alias was NOT to a php file? Is using >> > rewrite the only solution - alias not able to working? What >> > is alias doing to cause 404? >> >> This config works for

Re: Understanding alias (used as rewrite)

2015-06-23 Thread E.B.
Thanks for your ongoing helps! I hope someone can advise further > >> You're probably looking for this > >> > >> fastcgi_param SCRIPT_FILENAME /another/different/path/anotehrscript.php; > > > > Excellent point! Thanks you! > > However, what if the

Re: Understanding alias (used as rewrite)

2015-06-22 Thread Edho Arief
On Tue, Jun 23, 2015 at 5:32 AM, E.B. wrote: >> >> You're probably looking for this >> >> fastcgi_param SCRIPT_FILENAME /another/different/path/anotehrscript.php; > > Excellent point! Thanks you! > However, what if the alias was NOT to a php file? Is using &

Re: Understanding alias (used as rewrite)

2015-06-22 Thread E.B.
> > So I was confucsed why this not working: > > > > location ^~ /my-long-prefix-goes-here { > > alias /another/different/path/anotherscript.php; > > include fastcgi.conf; > > } > > > > In other words, alias of exact location match does > >

Re: Understanding alias (used as rewrite)

2015-06-22 Thread Edho Arief
On Mon, Jun 22, 2015 at 7:05 PM, E.B. wrote: > Hi, I'm confused about the details of "alias" used as > a kind of rewrite (which should be more efficient as > I understand it, as long as its appropriately used). > > I found I can do this: > > location = /pa

Understanding alias (used as rewrite)

2015-06-22 Thread E.B.
Hi, I'm confused about the details of "alias" used as a kind of rewrite (which should be more efficient as I understand it, as long as its appropriately used). I found I can do this: location = /path/number/one.html { alias /some/other/path/script.php; include fastcgi.co

Re: noob needs help with alias locations and php

2015-05-28 Thread Francis Daly
t; listen80; > server_name localhost lo; > root /var/www/sites/localhost/www; > > location / { > try_files $uri $uri/ /index.html /index.php; > } > The request "/movies/index.html" will be handled in this loc

noob needs help with alias locations and php

2015-05-27 Thread Mike Wright
{ listen80; server_name localhost lo; root /var/www/sites/localhost/www; location / { try_files $uri $uri/ /index.html /index.php; } location /movies { alias /home/mike/Movies/; } location ~ \.php$ { root

Re: alias vs root in regex location

2015-04-11 Thread Francis Daly
On Fri, Apr 10, 2015 at 07:09:43PM -0400, avi9526 wrote: Hi there, > Trying to serve nagios web GUI through nginx. > location ~ "^/nagios/(.+?\.php)(/.*)?$" > { > alias "/usr/share/nagios3/htdocs/"; > try_files $1 $uri $uri/ /nag

alias vs root in regex location

2015-04-10 Thread avi9526
Trying to serve nagios web GUI through nginx. Part of config: … location ~ "^/nagios/(.+?\.php)(/.*)?$" { alias "/usr/share/nagios3/htdocs/"; try_files $1 $uri $uri/ /nagios/index.php; #rewrite"^/nagios/(.

Re: download and movie alias

2015-01-11 Thread Silvio Siefke
Hello, On Fri, 9 Jan 2015 23:52:25 + Francis Daly wrote: > location = /download { return 301 /download/; } Thank you it works. Silvio ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: download and movie alias

2015-01-09 Thread Francis Daly
On Sat, Jan 10, 2015 at 12:11:20AM +0100, Silvio Siefke wrote: Hi there, > I understand not why the link www.example.com/download > not work but www.example.com/download/ works. The request /download does not match either of these location{} blocks. > location ~ ^/video/(.*)$ { > location ~

download and movie alias

2015-01-09 Thread Silvio Siefke
Hello, i use static directory for my css files, video files and download directory. I understand not why the link www.example.com/download not work but www.example.com/download/ works. Has someone an idea what is wrong? # video files for all websites location ~ ^/video/(.*)$ { alias

Re: 'location' as an alias for 'server'?

2014-11-04 Thread B.R.
the following: location /lalala { alias /usr/share/webapps; include locations/lalala.conf; } The locations directory shall include your per-location rules. Note that directives working at server level might not do inside a location. Those are 2 different scope with specific purposes. I

'location' as an alias for 'server'?

2014-11-04 Thread lockheed
I have nginx set up with several servers in /etc/nginx/sites-enabled However, I want to convert my setup to one domain ***myserver.com*** , so typing in a browser "lalala.com" will no longer get me to the appropriate ***/usr/share/webapps/lalala*** subfolder. Therefore, I want to create so

Re: Cannot create directory alias (with php pages)

2014-08-14 Thread Francis Daly
t the request "/dir/" indicating the file "/usr/share/xhprof/xhprof_html/dir/index.php"); and it is clearer than $document_root (which would normally be a directory name, if "alias" were not involved here). Cheers, f -- Francis Dalyfran...@daoine.org

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

Re: Cannot create directory alias (with php pages)

2014-08-14 Thread Francis Daly
04 Not Found). Nothing is recorded in the error > log. > > Why can't I access the php files in /usr/share/xhprof/xhprof_htmlas > /xhprof/filename.php ? The request is /xhprof/filename.php; that should be handled in this location: > location ~ /xhprof(.+\.php)$ { >al

Re: Cannot create directory alias (with php pages)

2014-08-14 Thread Nikolaos Milas
fault.html default.htm default.php; location / { try_files $uri $uri/ /index.php?$args; allow 127.0.0.1; allow ::1; allow 10.10.10.0/24; deny all; } location ~ /xhprof(.+\.php)$ { alias /usr/share/xhprof/xhprof_html$1; allow

Re: Cannot create directory alias (with php pages)

2014-08-13 Thread Pascale Camille
hi! if it can help i just get a 'redirection cycle' error in a *.conf ... return 301 http:// ... but my problem was solved because i found in etc/nginx some default.conf that made cycling check all etc/nginx/ -- Posted via http://www.ruby-forum.com/.

Cannot create directory alias (with php pages)

2014-08-13 Thread Nikolaos Milas
Hello, I have a hard time trying to make a "directory alias" (in Apache terminology - sorry, I still have a lot to learn on nginx)... I have piwik.example.com, configured to run piwik analytics (it is a php site), and it works fine. I runs under nginx v1.6.1, php-fpm v5.3.3 on

Re: Alias or rewrite to get Horde rpc.php to work

2014-06-25 Thread m1nu2
ore details > (mainly taken from the Serverfault question located here: > http://serverfault.com/questions/604866/nginx-alias-or-rewrite-for-hor > de-groupware-activesync-url-does-not-process-the-r ): > > The configuration should allow to access the ActiveSync part via the >

Alias or rewrite to get Horde rpc.php to work

2014-06-16 Thread m1nu2
nginx-alias-or-rewrite-for-horde-groupware-activesync-url-does-not-process-the-r ): The configuration should allow to access the ActiveSync part via the URL /horde/Microsoft-Server-ActiveSync. The horde webinterface is already accessible via /horde My configuration looks like this: default-ssl

Re: redirect 301 alias domain

2014-03-05 Thread Francis Daly
On Wed, Mar 05, 2014 at 03:18:31AM -0500, zuckbin wrote: > i don't understand why you said that is not the good conf file is used ? > > how do you know this ? You request http://www.aaa.com/. You get a redirect to http://www.aaa.com/. Which part of the configuration you showed does a redirect to

Re: redirect 301 alias domain

2014-03-05 Thread zuckbin
i don't understand why you said that is not the good conf file is used ? how do you know this ? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,248038,248123#msg-248123 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/l

Re: redirect 301 alias domain

2014-03-04 Thread Francis Daly
On Tue, Mar 04, 2014 at 08:27:39AM -0500, zuckbin wrote: Hi there, this... > curl -i "http://www.aaa.com/"; > Location: http://www.aaa.com/ says that the config that you think nginx is using is not the config that nginx is using. You have a few other recent mails which probably have the same

Re: redirect 301 alias domain

2014-03-04 Thread zuckbin
i forgot to say that i used pound on my server before to send traffic to nginx Maybe, there is a conflict with it Posted at Nginx Forum: http://forum.nginx.org/read.php?2,248038,248071#msg-248071 ___ nginx mailing list nginx@nginx.org http://mailman.n

Re: redirect 301 alias domain

2014-03-04 Thread zuckbin
curl -i "http://www.aaa.com/"; HTTP/1.1 301 Moved Permanently Server: nginx Date: Tue, 04 Mar 2014 13:25:24 GMT Content-Type: text/html Content-Length: 178 Connection: keep-alive Keep-Alive: timeout=5 Location: http://www.aaa.com/ 301 Moved Permanently 301 Moved Permanently nginx Posted at Ng

Re: redirect 301 alias domain

2014-03-04 Thread Francis Daly
On Tue, Mar 04, 2014 at 06:10:31AM -0500, zuckbin wrote: Hi there, > in firebug i can see this many times: > > GET www.aaa.com 301 Moved Permanently aaa.com > > it seem this is not redirect well This seems to say the when you ask for http://www.aaa.com/, you are redirected to http://aaa.com/.

Re: redirect 301 alias domain

2014-03-04 Thread zuckbin
i got this error The page isn't redirecting properly in firebug i can see this many times: GET www.aaa.com 301 Moved Permanently aaa.com it seem this is not redirect well Posted at Nginx Forum: http://forum.nginx.org/read.php?2,248038,248068#msg-248068 ___

Re: redirect 301 alias domain

2014-03-03 Thread Maxim Dounin
Hello! On Mon, Mar 03, 2014 at 10:43:01AM -0500, zuckbin wrote: > hi, > > i want to do a 301 redirect on all my alias domain for a domain > > but i stuck in an infinite loop! > > server{ > listen 80; > server_name www.aaa.com www.aa.com ... >

Re: redirect 301 alias domain

2014-03-03 Thread Francis Daly
On Mon, Mar 03, 2014 at 10:43:01AM -0500, zuckbin wrote: Hi there, > i want to do a 301 redirect on all my alias domain for a domain > > but i stuck in an infinite loop! What's the problem? What request do you make; what response do you get; what response do you want?

redirect 301 alias domain

2014-03-03 Thread zuckbin
hi, i want to do a 301 redirect on all my alias domain for a domain but i stuck in an infinite loop! server{ listen 80; server_name www.aaa.com www.aa.com ... return 301 http://www.bbb.com$request_uri; } server{ listen 80; server_name www.bbb.com ... } how to

Re: cache-proxy passes garbled fonts + alias problem

2014-02-17 Thread Maxim Dounin
Hello! On Mon, Feb 17, 2014 at 02:08:47PM +0200, Beeblebrox wrote: > Is there any possibility to get some input re this problem? > Where can I start looking for answers? http://www.catb.org/~esr/faqs/smart-questions.html -- Maxim Dounin http://nginx.org/ __

cache-proxy passes garbled fonts + alias problem

2014-02-17 Thread Beeblebrox
Is there any possibility to get some input re this problem? Where can I start looking for answers? ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

cache-proxy passes garbled fonts + alias problem

2014-02-06 Thread Beeblebrox
issue when not using the nginx cache proxy. 2. I'm doing soemething wrong with alias, and it does not work. location /wp { alias /dbhttp/wordpress/; fastcgi_pass unix:/var/run/www/php-fpm.sock; } The browser does not go to page when I type in /wp or any other alias. Thanks for

Re: nested location, proxy, alias and multiple "/" locations

2014-01-19 Thread Francis Daly
a regexp case. "^~" is a prefix location. The "non-regex" documentation applies. > My q is "location ^~ /i/" which seems to skip the replacement as in the > simple case: > location ^~ /app1/ { > alias /var/www/Laravel/public/; > proxy_pass http://127

Re: nested location, proxy, alias and multiple "/" locations

2014-01-19 Thread sergiks
://www.site.com/app1/api/method (pretty urls) http://www.site.com/app1/css/bootstram.min.css (static files) There will be more that one such app sitting under various subfolders of a single web site. ------ >> 1. what happens to an "alias" inside a "^~" location like

Re: nested location, proxy, alias and multiple "/" locations

2014-01-18 Thread Francis Daly
ing to this other url", and whatever else you want nginx to do? > 1. what happens to an "alias" inside a "^~" location like "location ^~ /app1 > { ... }" – seems like $uri is not changed and "/abcdef" part remains in > place. It should do what th

nested location, proxy, alias and multiple "/" locations

2014-01-18 Thread sergiks
i =404; ... } location ~* !(\.(jpg|gif|png))$ { proxy_pass http://127.0.0.1:8081; ... } } [/code] Two questions: 1. what happens to an "alias" inside a "^~" location like "location ^~ /app1 { ... }" – seems like $uri

Re: alias

2013-12-17 Thread Francis Daly
On Sat, Dec 14, 2013 at 01:04:59AM +, Matthew Ngaha wrote: Hi there, > So it seems the reloading wasn't taking effect and only did > after a restart of my PC. i've beeb typing "sudo service nginx > reload" after editing .. why isn't this working, do i have to do > something else? The best r

Re: alias

2013-12-13 Thread Matthew Ngaha
hey so out of all those config files i edited, i reloaded all of them and the changes weren't made. I think i stumbled onto the problem today. whenever it didn't work i always put the files back to their defaults before switching off my PC but this time i didn't. Today i didn't touch any config fil

Re: alias

2013-12-11 Thread Francis Daly
On Wed, Dec 11, 2013 at 08:20:51PM +, Matthew Ngaha wrote: > > On Tue, Dec 10, 2013 at 10:17:25PM +, Matthew Ngaha wrote: > > That suggests that the configuration you are editing, and the > > configuration that nginx is using, are not the same. > /home/matthew/src/nginx-1.4.3/conf/nginx.c

Re: alias

2013-12-11 Thread Matthew Ngaha
> On Tue, Dec 10, 2013 at 10:17:25PM +, Matthew Ngaha wrote: >> The problem i've been having after looking in the error logs,is that >> it's still trying to find /admin/ in the default html root. > > That suggests that the configuration you are editing, and the > configuration that nginx is us

Re: alias

2013-12-10 Thread Francis Daly
ite.com/html; > >> location /admin/ { > >> alias /var/www/locked/; > >> } > >>} > >> } > The problem i've been having after looking in the error logs,is that > it's still trying to find /admin/ in the default html root. That sugge

Re: alias

2013-12-10 Thread Matthew Ngaha
root /var/www/website.com/html; >> location /admin/ { >> alias /var/www/locked/; >> } >>} >> } > > If you ask for http://localhost/request.html, nginx will try to > send the file /var/www/website.com/html/request.html. If you ask for >

Re: alias

2013-12-09 Thread Francis Daly
root /var/www/website.com/html; > location /admin/ { > alias /var/www/locked/; > } >} > } If you ask for http://localhost/request.html, nginx will try to send the file /var/www/website.com/html/request.html. If you ask for http://localhost/admin/request.html, n

alias

2013-12-09 Thread Matthew Ngaha
hi all, i just had a quick question about this example. http { server { server_name localhost; root /var/www/website.com/html; location /admin/ { alias /var/www/locked/; } } } When a

Re: Clean-URL rewrite rule with nested "location" and alias directive

2013-11-24 Thread Ben Johnson
try_files $uri /stage/index.php?q=$uri; >> fastcgi_pass unix:/var/run/php5-fpm.sock; >> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; >> include /etc/nginx/fastcgi_params; >> } >> } Francis, Yes! A

Re: Clean-URL rewrite rule with nested "location" and alias directive

2013-11-24 Thread Ben Johnson
On 11/23/2013 3:47 PM, Francis Daly wrote: > On Sat, Nov 23, 2013 at 01:11:46PM -0500, Ben Johnson wrote: >> On 11/23/2013 12:36 PM, Ben Johnson wrote: > > Hi there, > >>> It's bizarre. At some point while meddling with the configuration, >>> requests for /stage/ began causing the browser to do

Re: Clean-URL rewrite rule with nested "location" and alias directive

2013-11-23 Thread Francis Daly
On Sat, Nov 23, 2013 at 01:11:46PM -0500, Ben Johnson wrote: > On 11/23/2013 12:36 PM, Ben Johnson wrote: Hi there, > > It's bizarre. At some point while meddling with the configuration, > > requests for /stage/ began causing the browser to download index.php > > (and I can open the file and see

  1   2   >