Make a location block pointing to a file, and put your rewrite inside of there. It won't check if the file exists, but if you want it to redirect anyways, that shouldn't matter. location /some_file { rewrite another_file; }by Piki - How to...
Nginx in general is much faster and more stable than Apache, and much easier to configure. It can also handle dynamic content no problem if you have the needed backends installed (such as php-fpm to link Nginx to PHP). I've been using Nginx+PHP for some time now with minimal problems on Linux, and I've had way fewer problems than with Apache (mostly relating to speed). As for Windows, I've hearby Piki - Migration from Other Servers
blueoceancomm Wrote: ------------------------------------------------------- > Sorry I mean't to clarify: > - dev1-mia is running Apache and is correctly displaying the site. > - snax1-ord is running NGINX and is NOT displaying it correctly. > > It is the same source on both. > > version is nginx.x86_64 0:1.2.4-1.el6.ngx It's possible (I don't know for sure) tby Piki - How to...
Alex Mashin Wrote: ------------------------------------------------------- > I use nginx as a reverse proxy. I need to specify a special > location(s) for certain URLs containing Cyrillic letters that would > prevent caching and cache lookup, which happen otherwise (for location > /). > > 1) Are URLs really decoded as written at > http://wiki.nginx.org/HttpCoreModule#by Piki - How to...
Is it possible to cause nginx to generate a custom error code of my invention, e.g. instead of sending a "403 Forbiddent" message, have nginx send a 101 error and have a custom HTML page stating what the error stands for? (101 Time To Learn. You have been directed here because you need to learn about asking permission before trying to access other people's private stuff. ;-) )by Piki - How to...
I have been an nginx fan for nearly a year, and have yet to experience any crashing. However, I occassionally suffer nightmares with my php backend. php-fpm usually runs fine, but will crash on occasion. Is it possible to make nginx serve up html files instead if php-fpm crashes? I already plan to put a script to detect restart php-fpm whenever it's crashed, but the script isn't going to runby Piki - How to...
Two options to look at in nginx.conf: keepalive_timeout 60; worker_connections 1024; The first I found under the http block, and the second in the events block. You shouldn't have to tweak the worker_connections much, usually it's better to keep it high. The keepalive_timeout limits how long browsers can stay connected to your web server. This one boils down to balancing nginx's load and tby Piki - How to...
Piki Wrote: ------------------------------------------------------- > I am running nginx+php-fpm on localhost for testing some stuff sites > before uploading to a live server (which I have done with nginx in the > past), and have run into the first issue which Google can't seem to > help me with: > > I have decided to try three different forum softwares. They are > inby Piki - Nginx Mailing List - English
I actually found a .htaccess to nginx converter. I'm not sure how well it works (it comes with a disclaimer to check the output before using), but after pasting in your .htaccess example, it spit out the following code: # nginx configuration location ~ /casastatus { } location / { if (!-e $request_filename) { rewrite ^(.*)$ /dispatcher.php/$1; } } I'm not too familiar with .htaccesby Piki - Migration from Other Servers
It can't exactly come up with a "page not found" error if there IS a page at www.example.com, nor can it load www.example.com on port 443 since https defaults to 443 and www.example.com is only listening to port 80. I'd imagine it should come up with an internal server error instead, unless nginx is designed such that, in a situation like this, it will default to the only site on portby Piki - Migration from Other Servers
I see one potential issue. It is in the following block: if ($host !~* ^www\.) { rewrite ^(.*)$ http://www.$host$1 permanent; } If I remember correctly, most apps written in C and C++ interpret ! to mean "not", so if $host no have www. in it, rewrite it so it does have www. in it. That is placed under the server block that looks for mysite.com and www.mysite.com. If you want it tby Piki - How to...
The most obvious thing I can think of is file and directory permissions. Unless absolutely necessary, the user and group assigned to nginx should never have write permissions to anything. That reduces the risk of someone possibly discovering a bug or whole somewhere that lets them upload some script that messes up your server. As strange a suggestion as it may be for us UNIX fans, I'd also suggby Piki - How to...
My best suggestion would be to look through your nginx and php settings to limit the amount of persistent connections and total connections (both to mysql and to your site(s)). The more persistent connections there are, the more processes on your server and web browsers accessing the site will be able to maintain a single connection each, so limitting those will force it to cut off anything inactiby Piki - Nginx Mailing List - English
Just coming back to post more specific info on my config (I'm usually much better about that): OS: Debian 6.0 "Squeeze" with dotdeb repository (http://www.dotdeb.org/) nginx: 1.2.4 PHP & php-fpm: 5.4.7 nginx.conf: user www-data; worker_processes 4; pid /var/run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ##by Piki - Nginx Mailing List - English
Hello! I've been a happy nginx user since just before the 1.0 release. So far, I've been quite satisfied: It seems a tad bit easier to configure that apache, and much much faster and much much easier on my hardware. Google has also been much more willing to turn up easy-to-follow answers for a newbie like me (until now). Not much to say about me except that I'm a Linux geek (though not a fulby Piki - New Member Introductions
I am running nginx+php-fpm on localhost for testing some stuff sites before uploading to a live server (which I have done with nginx in the past), and have run into the first issue which Google can't seem to help me with: I have decided to try three different forum softwares. They are installed under separate subdirectories within my web root (e.g. /srv/www/localhost/html/{forum1,forum2,forum3}by Piki - Nginx Mailing List - English
![]() |
![]() |
![]() |
![]() |
![]() |