From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,URIBL_SBL autolearn=no version=3.2.5 Message-ID: <5225731E.8000404@kemsu.ru> Date: Tue, 03 Sep 2013 12:26:54 +0700 From: REAL User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130610 Thunderbird/17.0.6 MIME-Version: 1.0 To: ALT Linux Community general discussions References: <52240740.5020109@kemsu.ru> <5224279D.90106@kemsu.ru> In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Comm] wiki & nginx X-BeenThere: community@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Community general discussions List-Id: ALT Linux Community general discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 05:28:27 -0000 Archived-At: List-Archive: List-Post: Продолжаем ковырять. Переделал конфиг (см. в конце). Но на каждое обращение к wiki получаю "502 Bad Gateway". Что я упустил? server { listen *:8080; # can't use wildcards in first server_name server_name localhost localhost.localdomain; root /opt/tomcat/static; location / { # autoindex off; # autoindex_exact_size on; # autoindex_localtime off; # expires off; # cooperate with mod_realip in apache-1.3 or mod_rpaf in apache-2.x # proxy_redirect off; # proxy_set_header Host $host; # proxy_set_header X-Real-IP $remote_addr; # proxy_set_header X-Forwarded-For $remote_addr; # proxy_pass http://back.end.addr.ess:80/; # # NB: it's better for URI canonicalization that apache sits on :80 # (even if that's only 127.0.0.1:80) # # see also set_real_ip_from, real_ip_header if this nginx # would need to cooperate with another one acting as a frontend } # Pass PHP scripts to PHP5-FPM # location ~* \.php$ { # fastcgi_index index.php; # fastcgi_pass unix:/var/run/php5-fpm/php5-fpm.sock; # include fastcgi_params; # fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # fastcgi_param SCRIPT_NAME $fastcgi_script_name; # } access_log /var/log/nginx/access.log; } server { listen *:8080; server_name iais.kemsu.ru; root /opt/tomcat/static/wiki; client_max_body_size 5m; client_body_timeout 60; location / { try_files $uri $uri/ @rewrite; } location @rewrite { rewrite ^/(.*)$ /index.php?title=$1&$args; } location ^~ /maintenance/ { return 403; } location ~ \.php$ { include fastcgi_params; fastcgi_pass unix:/tmp/phpfpm.sock; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { try_files $uri /index.php; expires max; log_not_found off; } location = /_.gif { expires max; empty_gif; } location ^~ /cache/ { deny all; } location /dumps { root /opt/tomcat/static/wiki/local; autoindex on; } } -- REAL aka Евгений Ростовцев, программист ЦНИТ КемГУ