From: REAL <real@kemsu.ru> To: ALT Linux Community general discussions <community@lists.altlinux.org> Subject: Re: [Comm] wiki & nginx Date: Tue, 03 Sep 2013 12:26:54 +0700 Message-ID: <5225731E.8000404@kemsu.ru> (raw) In-Reply-To: <CAPqq82tDu4VVnWSWeYzuZx18BcyFmzyw7iJt94u86wtqFgivsw@mail.gmail.com> Продолжаем ковырять. Переделал конфиг (см. в конце). Но на каждое обращение к 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 Евгений Ростовцев, программист ЦНИТ КемГУ
next prev parent reply other threads:[~2013-09-03 5:26 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-09-02 3:34 REAL 2013-09-02 5:52 ` REAL 2013-09-02 6:25 ` REAL 2013-09-03 2:58 ` REAL 2013-09-03 3:20 ` REAL 2013-09-03 3:35 ` REAL 2013-09-03 5:26 ` REAL [this message] 2013-09-04 2:36 ` REAL 2013-09-04 8:47 ` Michael Shigorin 2013-09-11 4:42 ` REAL 2013-09-11 6:02 ` REAL 2013-09-10 4:28 ` REAL 2013-09-10 5:08 ` Motsyo Gennadi aka Drool 2013-09-10 5:25 ` REAL 2013-09-10 8:23 ` Michael Shigorin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=5225731E.8000404@kemsu.ru \ --to=real@kemsu.ru \ --cc=community@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git