Show all posts by user
Introduce yourselves
If you are running a recent version of nginx which supports "try_files" you can try something like:
location ~* \.(gif|jpg|jpeg|png|wmv|avi|mpg|mpeg|mp4|htm|html|js|css|ico|bmp)$ {
root /home/nick/public_html;
try_files $uri @404;
}
location @404 {
proxy_pass 127.0.0.1:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
by
Jim Ohlstein
-
How to...
There is no native support for cgi in nginx so you have to proxy your script. The term "NPH" is an Apache specific term and doesn't matter to nginx (BTW).
There are three main choices. You can rewrite your script as a fastcgi. You can proxy to Apache using mod_perl (preferably) or mod_cgi. Or you can use fcgiwrap - see http://nginx.localdomain.pl/wiki/FcgiWrap. I have an app that is w
by
Jim Ohlstein
-
How to...
Don't worry about your English. I understand you fine. :) Twój angielski jest dużo lepiej niż moj polski!
You can create whatever document root you want like this:
server {
listen 80;
server_name myserver.pl www.myserver.pl;
index index.html;
root /home/myserver.pl;
...
}
or, if you want to keep the default, only move some subdirectories:
server {
by
Jim Ohlstein
-
How to...
It seems to be working on my end. When I go to http://rho.kaffeinated.org I see your php info. When I go to http://rho.kaffeinated.org/index.html I see what looks like your nginx.conf. And when I go to http://rho.kaffeinated.org/pics/ I see an image hosting/re-sizing script. See attached screen capture.
by
Jim Ohlstein
-
How to...
The answer that I got to this question was "Not yet".
See http://forum.nginx.org/read.php?2,1890,2207#msg-2209.
by
Jim Ohlstein
-
Nginx Mailing List - English
Hello,
A Chinese forum was created at http://groups.google.com/group/cnginx.
If a separate Chinese subforum would be beneficial I would be happy to create it. Let me know.
by
Jim Ohlstein
-
Site Suggestions
I'm not sure what is a "clean solution" but surely there are ways to make it work using a shared internal IP:port combination.
I run multiple virtual hosts on many boxes using php as a fastcgi and they all pass to 127.0.0.1:9000 without difficulty. Of course that uses the fastcgi module which is a bit different. But one thing I do is to include the fastcgi parameters in each server bl
by
Jim Ohlstein
-
How to...
BTW, are you passing requests for *all* files to Apache? If you are, you are losing some of the great functionality of nginx which is its far superior ability to rapidly serve static files.
Another thing you can do to troubleshoot this, if it's still not working after fixing your nginx.conf, is to have Apache listen on 127.0.0.1 and 127.0.0.2 or, on 127.0.0.1:81 and 127.0.0.1:82 and use differe
by
Jim Ohlstein
-
How to...
How were you reloading nginx between config changes? It should have choked on this the "".
I though that "alias" didn't belong in server_name. You can safely remove that and leave as:
server {
server_name foo.bar www.foo.bar;
...
}
Generally the nginx master runs as root. It then starts the workers which run as the user specified, or as the default ("nobody
by
Jim Ohlstein
-
How to...
Do you get any warnings when you run
# nginx -t
or when you start nginx?
by
Jim Ohlstein
-
How to...
It's possible that "Host" header is missing from client request? Try changing:
proxy_set_header Host $http_host;
to:
proxy_set_header Host $host;
That will set "Host" to the server name.
by
Jim Ohlstein
-
How to...
Pahud wrote:
> Hello list,
>
> After some google search I guess this is yet discussed before. How do I:
>
> 1) disable nginx logging image requests(no . logging in access_log)
location ~* \.(gif|jpg|png) {
access_log off;
...
}
Or if all are in a directory and it's subdirectories:
location ^~ /images/ {
access_log off;
...
}
See
>
by
Jim Ohlstein
-
Nginx Mailing List - English
millisami wrote:
> The following post explains about the page caching in rails with Nginx.
>
> http://blog.hasmanythrough.com/2008/1/30/segregated-page-cache-storage
>
> I like to implement this solution with my app but on Apache. So, the main block/route is
>
> if (-f $request_filename) {
> break;
> }
> if (-f /cache$request_filename) {
>
by
Jim Ohlstein
-
Nginx Mailing List - English
Maxim Dounin wrote:
> Hello!
>
> On Tue, May 26, 2009 at 01:14:47PM +0200, Brandon Fisher wrote:
>
>
>> Okay i fixed it,for anyone else having the same problem
>> just download/compile openssl from http://openssl.org
>> i already had the fedora openssl package installed
>> but seems it wasnt good enough
>>
>
> AFAIK you need so
by
Jim Ohlstein
-
Nginx Mailing List - English
Brandon Fisher wrote:
> I attached the configure output,if thats what you were refering to
> not sure.
>
> Attachments:
> http://www.ruby-forum.com/attachment/3731/out.txt
>
>
I believe he meant you configure command like:
./configure --pid-path=/usr/local/nginx/logs/nginx.pid
--sbin-path=/usr/local/sbin/nginx --with-http_ssl_module
--with-http_stub_status_mo
by
Jim Ohlstein
-
Nginx Mailing List - English
Chris Wilson wrote:
> Is there a way to redirect and old domain to a new one,
>
> For instance, all I did was change domains, the structure is all still
> the same.
>
> I just need to redirect xxxx.com to xxxy.com while still keeping the
> structure of the incoming links as they remain in the same pace on the
> new site.
>
server {
listen 80;
by
Jim Ohlstein
-
Nginx Mailing List - English
Without seeing your settings it's hard to answer your question, but if it looks something like this:
server {
...
location ~ \.php$ {
fastcgi_pass ...
...
}
location ^~ /protected_directory/ {
auth_basic ... ;
auth_basic_user_file /path/to/passwd/file;
}
}
Then the fastcgi_pass will not be inherited. It needs to be respecified in your config. One way is:
server {
by
Jim Ohlstein
-
Migration from Other Servers
Igor Sysoev wrote:
> On Fri, May 22, 2009 at 01:31:13PM -0400, Jim Ohlstein wrote:
>
>
>> Ian Hobson wrote:
>>
>>> Jim Ohlstein wrote:
>>>
>>>> Ian Hobson wrote:
>>>>
>>>>> Hi all,
>>>>> I'm trying to set up basic authentication to protect an area of the
>>>>
by
Jim Ohlstein
-
Nginx Mailing List - English
Michael Shadle wrote:
> On Fri, May 22, 2009 at 10:31 AM, Jim Ohlstein <jim.ohlstein@gmail.com> wrote:
>
>
>> location ^~ /ppg/ {
>> auth_basic "Hello, Please login";
>> auth_basic_user_file /var/www/site.com/passwords;
>> location ~ .\php$ {
>> include /etc/nginx/fastcgi_params;
>> fastcgi_pass
by
Jim Ohlstein
-
Nginx Mailing List - English
Ian Hobson wrote:
> Jim Ohlstein wrote:
>>
>>
>> Ian Hobson wrote:
>>> Hi all,
>>> I'm trying to set up basic authentication to protect an area of the
>>> website served by php.
>>>
>>> The critical bits of my server directive are.
>>>
>>> server (
>>> listen 80;
>>> server_name
by
Jim Ohlstein
-
Nginx Mailing List - English
Ian Hobson wrote:
> Hi all,
> I'm trying to set up basic authentication to protect an area of the
> website served by php.
>
> The critical bits of my server directive are.
>
> server (
> listen 80;
> server_name site.com www.site.com;
> root /var/www/site.com/htdocs;
> index index.php index.html index.htm;
> access_log /var/www/site.c
by
Jim Ohlstein
-
Nginx Mailing List - English
See http://wiki.nginx.org/NginxHttpCoreModule#client_header_buffer_size
and http://wiki.nginx.org/NginxHttpCoreModule#large_client_header_buffers.
Jim
Olivier B. wrote:
> Hello,
>
> is there a way witch NginX to ignore or delete a too long cookie ?
> (which produce a return 400 Bad Request)
>
> Thanks,
> Olivier
>
>
by
Jim Ohlstein
-
Nginx Mailing List - English
Hi,
Your English is fine.
There are several DNS problems with this domain. Running your own authoritative name server might be a good idea.
See http://intodns.com/heycandy.info and/or http://private.dnsstuff.com/tools/dnsreport.ch?domain=heycandy.info&token=13605694a6c268c5065589961a7af019.
As for your nginx configuration, I would change:
server_name .heycandy.info;
to
by
Jim Ohlstein
-
How to...
If you are checking for the existence of a file or a directory you can use:
if (-e $request_filename) {
rewrite ... ;
}
or the absence of a requested file or directory:
if (!-e $request_filename) {
rewrite ... ;
}
You can also use "try_files". See http://wiki.nginx.org/NginxHttpMainModule#try_files.
by
Jim Ohlstein
-
Migration from Other Servers
Maxim Dounin wrote:
> Hello!
>
> On Tue, May 19, 2009 at 05:09:39PM -0400, Jim Ohlstein wrote:
>
>
>> Is there a way to log cache hits and misses?
>>
>
> Not yet.
>
Thanks Maxim. I can live with the word "yet". :)
> Maxim Dounin
>
>
>
Jim
by
Jim Ohlstein
-
Nginx Mailing List - English
The "development" branch has more frequent changes, hence it's referred to as such.
The "stable" branch has fewer version releases, hence it is referred to as such.
New features are added to the development branch, and sometimes ported to the stable branch, sometimes not.
There are many large sites running the development branch, and quite a few running the stable bran
by
Jim Ohlstein
-
Nginx Mailing List - English
You would get the best advice if you post this question at vbulletin.com.
------Original Message------
From: Wicked
Sender: owner-nginx@sysoev.ru
To: nginx@sysoev.ru
ReplyTo: nginx@sysoev.ru
Subject: Best PHP.ini
Sent: May 19, 2009 10:54 AM
Hello,
i'm searchin for a good php.ini..
my Server Specs..
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Memory: 2GB Ram
HDD: 2 x 3
by
Jim Ohlstein
-
Nginx Mailing List - English
Hmmm....
I wonder if the rewrite came at the end of the block (or after it entirely) if that would have worked.
No matter as long as your app is functioning as intended.
by
Jim Ohlstein
-
How to...