Nginx (anomalies with pictures)

Hello!

Look please the configuration:

  1. When you come to “http://server1.com/phpmyadmin” - the image is
    displayed
  2. But after entering the login and password
    http://server1.com/phpmyadmin” - images are not displayed!, Why?

nginx/0.7.61 <<<<with the other versions have not tried, but probably is not the version.

user www;
worker_processes 3;

pid / var / run / nginx.pid;

events (
worker_connections 1024;
)
http (
include mime.types;
default_type application / octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
server_names_hash_max_size 2048;
server_names_hash_bucket_size 128;

server1.com

server (
listen 80;
server_name server1.com;

charset utf8;
client_max_body_size 25m;

location / (
root / usr/local/www/web1;
index index.html;
)

location / phpmyadmin (
alias / usr/local/www/web2 /;
index index.html index.php;
)

location ~ * . php $ (
rewrite ^ / phpmyadmin (/.+)$ $ 1 break;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME / usr/local/www/web2 $
fastcgi_script_name;
include fastcgi_params;
)
)
)
[/ code]

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,5290,5290#msg-5290

On Sat, Aug 29, 2009 at 05:01:29AM -0400, gloomen wrote:

tcp_nodelay on;
client_max_body_size 25m;

location ~ * . php $ (
rewrite ^ / phpmyadmin (/.+)$ $ 1 break;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME / usr/local/www/web2 $ fastcgi_script_name;
include fastcgi_params;
)
)
)
[/ code]

Have you look in error_log ?

Instead of

location ~* .php$ (
rewrite ^ /phpmyadmin (/.+)$ $1 break;
fastcgi_param SCRIPT_FILENAME / usr/local/www/web2 $
fastcgi_script_name;

it’s better to use

location ~* ^/phpmyadmin(/.+.php)$ (
fastcgi_param SCRIPT_FILENAME /usr/local/www/web2$1;

location ~* ^/phpmyadmin(/.+.php)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/www/web2$1;
include fastcgi_params;
}

Игорь, спасибо большое.
Работает всё ОК!

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,5290,5298#msg-5298

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs