There is no htaccess support in nginx. Maybe you can try: location ^~ \.html { proxy_pass http://127.0.0.1:8080; ... } And have apache listening on 8080. It's possible this will wor. YMMV of course, especially in terms of efficiency, depending at least in part on whether these URI's represent static or dynamic content.by Jim Ohlstein - Migration from Other Servers
Please see http://nginx.org/en/docs/http/configuring_https_servers.html, specifically http://nginx.org/en/docs/http/configuring_https_servers.html#chains. Your problem may be here. You may also want to read http://wiki.nginx.org/NginxHttpSslModule.by Jim Ohlstein - How to...
Why not use nginx's built in rewrite function?by Jim Ohlstein - Migration from Other Servers
server { listen 80; server_name test.xxx.com; root /path/to/directory; ... } server { listen 443; server_name store.xxx.com; root /path/to/directory; ... # SSL stuff here ... }by Jim Ohlstein - How to...
It really depends on the situation. Most of the time I've seen this issue arise is because the configuration file is improperly set up and the URI is being captured by another location block. In this case, it likely would be the "php" location block. The configuration file needs to be set up so that *all* files in the protected directory are captured by the location to be protected.by Jim Ohlstein - How to...
Please post your complete config file(s).by Jim Ohlstein - How to...
You can try: location ^~ /v2/ { rewrite ^ http://www.example.com$request_uri? permanent; }by Jim Ohlstein - How to...
On 4/24/10 9:19 PM, Maxim Dounin wrote: > Hello! > > On Sat, Apr 24, 2010 at 09:59:46AM -0400, Jim Ohlstein wrote: > >> On 4/24/10 9:18 AM, Maxim Dounin wrote: [...] > > I don't really understand how parsing non-Latin characters is > related to threading. It should be done based on matching > Message-Id and In-Reply-To/References headers, which are > ASCII-only.by Jim Ohlstein - Nginx Mailing List - English
On 4/24/10 9:41 AM, Alejandro Mery wrote: > Hi Jim, > >> Can you point me to other mailing list replies that seem to be missing? > > oh, thanks! it seems it's only the "natural" delay. when I checked > they weren't there *yet*. and some confusion on replies to threads > with the same topic. my reply to > http://forum.nginx.org/read.php?2,77780,77780#msg-77780 iby Jim Ohlstein - Nginx Mailing List - English
On 4/24/10 9:18 AM, Maxim Dounin wrote: > Hello! > > On Sat, Apr 24, 2010 at 09:00:31AM -0400, Jim Ohlstein wrote: > >> On 4/24/10 6:06 AM, Alejandro Mery wrote: >>> Hello, >>> >>> any idea why the forum/mailing list gateway ignores my replies? do I >>> need to register there or there are certain "tokens" I need to include >>>by Jim Ohlstein - Nginx Mailing List - English
On 4/24/10 6:06 AM, Alejandro Mery wrote: > Hello, > > any idea why the forum/mailing list gateway ignores my replies? do I > need to register there or there are certain "tokens" I need to include > in the reply? > > Thanks, > Alejandro Mery http://forum.nginx.org/read.php?2,78723,78723#msg-78723 http://forum.nginx.org/read.php?2,78633,78721#msg-78721 http://foby Jim Ohlstein - Nginx Mailing List - English
On 4/19/10 10:11 PM, escavern wrote: > how to redirect user from http://www.myhostname.com to http://hostname.com ?? > i mean if they access http://www.myhostname.com he will be redirected to http://hostname.com > pls help me server { listen 80; server_name hostname.com; ... } server ( listen 80; server_name www.myhostname.com; rewrite ^ http://hostname.com$reqby Jim Ohlstein - Nginx Mailing List - English
See http://wiki.nginx.org/NginxHttpUpstreamModule.by Jim Ohlstein - How to...
AFAIK, Upload Progress Module is a third party add-on that needs to be added to nginx when it's compiled. Since nginx for Windows is available is binary only it's not possible to change the compile options.by Jim Ohlstein - Migration from Other Servers
compiler2k Wrote: ------------------------------------------------------- > Hi. I tested your suggestions with the following > code: > > > location ~* ^.+.(jpg|jpeg|gif|png|ico|(and so > on)|htm|html)$ { > root /var/www; > try_files $request_uri $request_uri/ > @backend; > } > > location @backend { > proxy_by Jim Ohlstein - How to...
You could try something like: location / { root /var/www; try_files request_uri request_uri/ @backend; ... } location @backend { proxy_pass http://127.0.0.1:81; include /etc/nginx/proxy.conf; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; ... } The try_files directive is more efficient than an "if" directive, which canby Jim Ohlstein - How to...
Most nginx rewrites will begin with a caret (^). Also, generally, quotes are not necessary unless you are using curly braces as they have special meaning in nginx configuration files. For the first line try rewrite ^/index\.asp /index.php last; and so on. I am not an expert in lighttpd rewrites but that would be a good place to start.by Jim Ohlstein - Migration from Other Servers
On 3/26/10 11:13 AM, bvc100x wrote: > I running 1000 php process to serve user download file content! i was start testing nginx a few weeks ago! i am also running 70+ servers serving php download content! > > I do not use nginx on any of my server right now! reason: > > nginx only support fastcgi, do not support php itself! we need php only support! not fastcgi! some dynamic contentby Jim Ohlstein - Nginx Mailing List - English
Have you tried: rewrite ^/wp-content/uploads/(.*)/(.*)/(.*)\.(.*)$ /files/$1/$2/$3.$4 last; rewrite ^/([0-9]+)$ /?p=$1 permanent; Those *should* work. If not, please post detailed config files.by Jim Ohlstein - How to...
There is no .htaccess support in nginx. I think what you want to add to your configuration is: server { .... location / { .... rewrite ^/(.*)\.html$ /$1 permanent; .... } .... }by Jim Ohlstein - How to...
This is the expected behavior. I would guess that your configuration file contains a different location block for handling files with a ".php" extension. In this case nginx will only match one location. See http://wiki.nginx.org/NginxHttpCoreModule#location. To avoid serving the index.php file as a text file you can try using nested location blocks. This is an undocumented feature andby Jim Ohlstein - Nginx Mailing List - English
Hello, Thanks for the offer. I prefer that you make a donation to the developer. Instructions are at http://sysoev.ru/en/donation.html.by Jim Ohlstein - Site Suggestions
jpilon Wrote: ------------------------------------------------------- > Hello, > > I haven't actually deployed nginx yet, very > interested in in though. > > Couple questions about performance. We're thinking > about moving to rackspace cloud servers and > setting up a load balanced config with the > following: > - 1 2gb ram database only server > - 2by Jim Ohlstein - How to...
philipp Wrote: ------------------------------------------------------- > @Jim thanks for your hint, I am already using this > kind of solution. > > But I'd rather like to generalise my approach. > Cause my web project is in a svn repository I can > cache all files in case they have a revision > param. I do not want to specify file types. Maybe > this is a featureby Jim Ohlstein - How to...
Well that's too bad... I had never tried it. I guess I'm not accustomed to seeing static content with a query string. How about trying to capture the image files with regex like: location ~* \.(jpe?g|gif|png|)$ { # add or remove file extensions as needed proxy_cache_valid 200 60d; proxy_cache_valid 404 5m; proxy_cache cache; expires 60d; } and the other pages in a similar faby Jim Ohlstein - How to...
I don't believe that nginx will look at the query string in evaluating a location You might try something like this: location / { if ( $args ~* "\?rev=([0-9]+)$" ) { proxy_cache_valid 200 60d; proxy_cache_valid 404 5m; proxy_cache cache; expires 60d; } include /etc/nginx/proxy.conf; proxy_pass http://127.0.0.1:9000; track_uploads uploadTracker 30s; } Note: yoby Jim Ohlstein - How to...
Eight cores, no hyperthreading = eight workers as a rule of thumb. As for connections, I'd start with 4096 per worker. Make sure that you have max open file descriptors adjusted properly. Default in CentOS is 1024 I believe.by Jim Ohlstein - How to...
It looks to me also like it should work. You ought to consider upgrading to latest stable or development version. That might fix the problem. If you did then you could also well improve performance using try_files instead of some if statements. See http://wiki.nginx.org/IfIsEvil. Also, for better performance I would eliminate if ($host !~* ^www\.) { rewrite ^(.*)$ htby Jim Ohlstein - How to...
It sets headers for the image: From http://wiki.nginx.org/NginxHttpHeadersModule: max assigns the time of 31 December 2037 23:59:59 GMT to the Expires header and 10 years for the Cache-Control header This assumes these files will not change, of course. Practically these files will eventually be deleted from a browser's cache as it get filled or flushed. You can always use: expiresby Jim Ohlstein - How to...