Can I just exclude a directory from rewrite?<br><br>I suppose I can move the gallery to a subdomain.<br><br><div class="gmail_quote">2009/5/16 Claude Bing <span dir="ltr"><<a href="mailto:tehbing@gmail.com">tehbing@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">K i will attempt to do this in a few minutes. I'll get back to you about the gallery<div>
<div></div><div class="h5"><br><br><div class="gmail_quote">2009/5/16 Igor Sysoev <span dir="ltr"><<a href="mailto:is@rambler-co.ru" target="_blank">is@rambler-co.ru</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>On Sat, May 16, 2009 at 07:04:43PM +0200, Claude Bing wrote:<br>
<br>
> Well I should clarify about the gallery. It's Gallery2, php-driven.<br>
<br>
</div>How does typical URL look ?<br>
<div><br>
> Where is the } that I should fix?<br>
<br>
</div>I have marked the by "+" and "-":<br>
<div><br>
+ }<br>
<br>
error_page 404 /index.php;<br>
<br>
</div> location ~ /\.ht {<br>
deny all;<br>
}<br>
-}<br>
<div><div></div><div>}<br>
<br>
> 2009/5/16 Igor Sysoev <<a href="mailto:is@rambler-co.ru" target="_blank">is@rambler-co.ru</a>><br>
><br>
> > On Sat, May 16, 2009 at 06:09:41PM +0200, Claude Bing wrote:<br>
> ><br>
> > > Ok, I followed a tutorial online and was trying to get rewrite working on<br>
> > my<br>
> > > server. Well, everything works ok except for my Photo gallery which is<br>
> > > located in | <domain>/gallery |. I'll include my current config for the<br>
> > > domain (wfto.cc and wfto.cc/gallery)<br>
> > > ========================<br>
> > > server {<br>
> > > listen 80;<br>
> > > server_name <a href="http://www.waterfortheoppressed.com" target="_blank">www.waterfortheoppressed.com</a><br>
> > <a href="http://waterfortheoppressed.com" target="_blank">waterfortheoppressed.com</a>;<br>
> > ><br>
> > > rewrite ^ <a href="http://wfto.cc" target="_blank">http://wfto.cc</a> permanent;<br>
> > > }<br>
> > ><br>
> > > server {<br>
> > > listen 80;<br>
> > > server_name <a href="http://www.wfto.cc" target="_blank">www.wfto.cc</a> wfto.cc;<br>
> > ><br>
> > ><br>
> > > access_log /var/www/logs/wfto.cc.access.log;<br>
> > ><br>
> > > location = / {<br>
> > > root /var/www/wfto.cc;<br>
> > > index index.php index.html index.htm;<br>
> > > }<br>
> > > location / {<br>
> > > root /var/www/wfto.cc;<br>
> > > index index.php index.html;<br>
> > ><br>
> > > if (!-f $request_filename) {<br>
> > > rewrite ^(.*)$ /index.php?q=$1 last;<br>
> > > break;<br>
> > > }<br>
> > ><br>
> > > if (!-d $request_filename) {<br>
> > > rewrite ^(.*)$ /index.php?q=$1 last;<br>
> > > break;<br>
> > > }<br>
> ><br>
> > + }<br>
> ><br>
> > > error_page 404 /index.php;<br>
> > ><br>
> > > # serve static files directly<br>
> > > location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {<br>
> > > access_log off;<br>
> > > expires 30d;<br>
> > > }<br>
> > > # redirect server error pages to the static page /50x.html<br>
> > > #<br>
> > > error_page 500 502 503 504 /50x.html;<br>
> > > location = /50x.html {<br>
> > > root /var/www/nginx-default;<br>
> > > }<br>
> > ><br>
> > > # proxy the PHP scripts to Apache listening on <a href="http://127.0.0.1:80" target="_blank">127.0.0.1:80</a><br>
> > > #<br>
> > > #location ~ \.php$ {<br>
> > > #proxy_pass <a href="http://127.0.0.1" target="_blank">http://127.0.0.1</a>;<br>
> > > #}<br>
> > ><br>
> > > # pass the PHP scripts to FastCGI server listening on<br>
> > <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a><br>
> > > #<br>
> > > location ~ \.php$ {<br>
> > > fastcgi_pass <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>;<br>
> > > fastcgi_index index.php;<br>
> > > fastcgi_param SCRIPT_FILENAME<br>
> > > /var/www/wfto.cc$fastcgi_script_name;<br>
> > > include fastcgi_params;<br>
> > > }<br>
> > ><br>
> > > # deny access to .htaccess files, if Apache's document root<br>
> > > # concurs with nginx's one<br>
> > > #<br>
> > > location ~ /\.ht {<br>
> > > deny all;<br>
> > > }<br>
> > > }<br>
> ><br>
> > - }<br>
> ><br>
> > > }<br>
> > > ========================<br>
> ><br>
> > First, you should fix '}',<br>
> > Second, use try_files instead of "if"s.<br>
> > And third, your gallery probably is served as static files by<br>
> ><br>
> > location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico)$ {<br>
> ><br>
> ><br>
> > --<br>
> > Igor Sysoev<br>
> > <a href="http://sysoev.ru/en/" target="_blank">http://sysoev.ru/en/</a><br>
> ><br>
> ><br>
><br>
><br>
> --<br>
><br>
</div></div>> Yogi Berra <<a href="http://www.brainyquote.com/quotes/authors/y/yogi_berra.html" target="_blank">http://www.brainyquote.com/quotes/authors/y/yogi_berra.html</a>> -<br>
<div><div></div><div>> "If you ask me anything I don't know, I'm not going to answer."<br>
<br>
</div></div><font color="#888888">--<br>
้วฯาุ ๓ูำฯลื<br>
<a href="http://sysoev.ru" target="_blank">http://sysoev.ru</a><br>
<br>
</font></blockquote></div><br><br clear="all"><br></div></div><font color="#888888">-- <br><br><a href="http://www.brainyquote.com/quotes/authors/b/bill_cosby.html" target="_blank">Bill Cosby</a> - "Fatherhood is pretending the present you love most is soap-on-a-rope."
</font></blockquote></div><br><br clear="all"><br>-- <br><br><a href="http://www.brainyquote.com/quotes/authors/y/yogi_berra.html" target="_blank">Yogi Berra</a> - "If you ask me anything I don't know, I'm not going to answer."