<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi Anoop</p>
<p>Its working fine now :)</p>
<p>Here's my final config:</p>
<p>location /wiki {<br>
<br>
try_files $uri $uri /wiki/index.php;<br>
location ~ \.php$ {<br>
fastcgi_param HTTP_PROXY "";<br>
try_files $uri =404;<br>
fastcgi_index index.php;<br>
include fastcgi_params;<br>
#fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;<br>
fastcgi_pass 127.0.0.1:9000;<br>
fastcgi_param SCRIPT_FILENAME
$document_root/$fastcgi_script_name;<br>
}<br>
}<br>
</p>
<p>Thank you very much for your help! <br>
</p>
<p>Etienne<br>
</p>
<br>
<div class="moz-cite-prefix">On 17/09/17 09:36 AM, Anoop Alias
wrote:<br>
</div>
<blockquote
cite="mid:CAO6TEX3ouE9J9a7PBhX18+TLU1Cpj5p3dYbABVEmLoExa5OmbQ@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Etienne,
<div><br>
</div>
<div>Assuming you want mediawiki to be served from /wiki/</div>
<div><br>
</div>
<div>##########################</div>
<div>server{</div>
<div><br>
</div>
<div>root /path/to/directory/excluding/wiki;</div>
<div>..</div>
<div>..</div>
<div>...</div>
<div>location /wiki/ {</div>
<div><br>
</div>
<div>try_files $uri $uri /wiki/index.php?query_string; <br>
</div>
<div><br>
</div>
<div>
<div> location ~ \.php$ {</div>
<div><br>
</div>
<div> try_files $uri =404;</div>
<div>
<div> fastcgi_index index.php;</div>
<div> include fastcgi_params;</div>
<div> fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;</div>
</div>
<div><br>
</div>
<div> }</div>
</div>
<div><br>
</div>
<div>}</div>
<div><br>
</div>
<div>##########################</div>
<div><br>
</div>
<div>note the ~ \.php location is inside location /wiki/ and the
root directive only come once in the server {}</div>
<div><br>
</div>
<div>Good Luck</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Sep 17, 2017 at 6:55 PM,
Etienne Robillard <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:tkadm30@yandex.com"
target="_blank">tkadm30@yandex.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi Anoop,</p>
<p>Not sure why, but php-fpm now returns a blank page. <br>
</p>
<p>Here's my error_log:</p>
<pre>2017/09/17 09:16:02 [debug] 21872#21872: epoll add event: fd:7 op:1 ev:00002001
2017/09/17 09:16:02 [debug] 21874#21874: epoll add event: fd:7 op:1 ev:00002001
2017/09/17 09:16:02 [debug] 21873#21873: epoll add event: fd:7 op:1 ev:00002001
2017/09/17 09:16:02 [debug] 21871#21871: epoll add event: fd:7 op:1 ev:00002001
2017/09/17 09:16:09 [debug] 21871#21871: accept on <a moz-do-not-send="true" href="http://0.0.0.0:80" target="_blank">0.0.0.0:80</a>, ready: 1
2017/09/17 09:16:09 [debug] 21873#21873: accept on <a moz-do-not-send="true" href="http://0.0.0.0:80" target="_blank">0.0.0.0:80</a>, ready: 1
2017/09/17 09:16:09 [debug] 21871#21871: accept() not ready (11: Resource temporarily unavailable)
2017/09/17 09:16:09 [debug] 21873#21873: posix_memalign: 0998ACC0:256 @16
2017/09/17 09:16:09 [debug] 21873#21873: *7 accept: <a moz-do-not-send="true" href="http://127.0.0.1:56704" target="_blank">127.0.0.1:56704</a> fd:4
2017/09/17 09:16:09 [debug] 21873#21873: *7 event timer add: 4: 60000:2415675759
2017/09/17 09:16:09 [debug] 21873#21873: *7 reusable connection: 1
2017/09/17 09:16:09 [debug] 21873#21873: *7 epoll add event: fd:4 op:1 ev:80002001
2017/09/17 09:16:09 [debug] 21873#21873: accept() not ready (11: Resource temporarily unavailable)
2017/09/17 09:16:09 [debug] 21873#21873: *7 http wait request handler
2017/09/17 09:16:09 [debug] 21873#21873: *7 malloc: 099AEEE8:1024
2017/09/17 09:16:09 [debug] 21873#21873: *7 recv: eof:0, avail:1
2017/09/17 09:16:09 [debug] 21873#21873: *7 recv: fd:4 134 of 1024
2017/09/17 09:16:09 [debug] 21873#21873: *7 reusable connection: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 posix_memalign: 09992DB0:4096 @16
2017/09/17 09:16:09 [debug] 21873#21873: *7 http process request line
2017/09/17 09:16:09 [debug] 21873#21873: *7 http request line: "GET <i class="m_6719180117000445463moz-txt-slash"><span class="m_6719180117000445463moz-txt-tag">/</span>wiki<span class="m_6719180117000445463moz-txt-tag">/</span></i> HTTP/1.1"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http uri: "<i class="m_6719180117000445463moz-txt-slash"><span class="m_6719180117000445463moz-txt-tag">/</span>wiki<span class="m_6719180117000445463moz-txt-tag">/</span></i>"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http args: ""
2017/09/17 09:16:09 [debug] 21873#21873: *7 http exten: ""
2017/09/17 09:16:09 [debug] 21873#21873: *7 http process request header line
2017/09/17 09:16:09 [debug] 21873#21873: *7 http header: "TE: deflate,gzip;q=0.3"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http header: "Connection: TE, close"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http header: "Host: localhost"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http header: "User-Agent: lwp-request/6.15 libwww-perl/6.15"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http header done
2017/09/17 09:16:09 [debug] 21873#21873: *7 event timer del: 4: 2415675759
2017/09/17 09:16:09 [debug] 21873#21873: *7 generic phase: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 rewrite phase: 1
2017/09/17 09:16:09 [debug] 21873#21873: *7 test location: "/pub"
2017/09/17 09:16:09 [debug] 21873#21873: *7 test location: "/webalizer"
2017/09/17 09:16:09 [debug] 21873#21873: *7 test location: "/wiki"
2017/09/17 09:16:09 [debug] 21873#21873: *7 test location: ~ "\.php$"
2017/09/17 09:16:09 [debug] 21873#21873: *7 using configuration "/wiki"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http cl:-1 max:5242880
2017/09/17 09:16:09 [debug] 21873#21873: *7 rewrite phase: 3
2017/09/17 09:16:09 [debug] 21873#21873: *7 post rewrite phase: 4
2017/09/17 09:16:09 [debug] 21873#21873: *7 generic phase: 5
2017/09/17 09:16:09 [debug] 21873#21873: *7 generic phase: 6
2017/09/17 09:16:09 [debug] 21873#21873: *7 generic phase: 7
2017/09/17 09:16:09 [debug] 21873#21873: *7 access phase: 8
2017/09/17 09:16:09 [debug] 21873#21873: *7 access phase: 9
2017/09/17 09:16:09 [debug] 21873#21873: *7 access phase: 10
2017/09/17 09:16:09 [debug] 21873#21873: *7 post access phase: 11
2017/09/17 09:16:09 [debug] 21873#21873: *7 content phase: 12
2017/09/17 09:16:09 [debug] 21873#21873: *7 open index "/home/www/<a moz-do-not-send="true" href="http://isotoperesearch.ca/wiki/index.php" target="_blank">isotoperesearch.ca/<wbr>wiki/index.php</a>"
2017/09/17 09:16:09 [debug] 21873#21873: *7 internal redirect: "/wiki/index.php?"
2017/09/17 09:16:09 [debug] 21873#21873: *7 rewrite phase: 1
2017/09/17 09:16:09 [debug] 21873#21873: *7 test location: "/pub"
2017/09/17 09:16:09 [debug] 21873#21873: *7 test location: "/webalizer"
2017/09/17 09:16:09 [debug] 21873#21873: *7 test location: "/wiki"
2017/09/17 09:16:09 [debug] 21873#21873: *7 test location: ~ "\.php$"
2017/09/17 09:16:09 [debug] 21873#21873: *7 using configuration "\.php$"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http cl:-1 max:5242880
2017/09/17 09:16:09 [debug] 21873#21873: *7 rewrite phase: 3
2017/09/17 09:16:09 [debug] 21873#21873: *7 post rewrite phase: 4
2017/09/17 09:16:09 [debug] 21873#21873: *7 generic phase: 5
2017/09/17 09:16:09 [debug] 21873#21873: *7 generic phase: 6
2017/09/17 09:16:09 [debug] 21873#21873: *7 generic phase: 7
2017/09/17 09:16:09 [debug] 21873#21873: *7 access phase: 8
2017/09/17 09:16:09 [debug] 21873#21873: *7 access phase: 9
2017/09/17 09:16:09 [debug] 21873#21873: *7 access phase: 10
2017/09/17 09:16:09 [debug] 21873#21873: *7 post access phase: 11
2017/09/17 09:16:09 [debug] 21873#21873: *7 http init upstream, client timer: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 epoll add event: fd:4 op:3 ev:80002005
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "PATH_INFO"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script var: "/wiki/index.php"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "PATH_INFO: /wiki/index.php"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "QUERY_STRING"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "QUERY_STRING: "
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "REQUEST_METHOD"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script var: "GET"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "REQUEST_METHOD: GET"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "CONTENT_TYPE"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "CONTENT_TYPE: "
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "CONTENT_LENGTH"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "CONTENT_LENGTH: "
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "SCRIPT_NAME"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script var: "/wiki/index.php"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "SCRIPT_NAME: /wiki/index.php"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "REQUEST_URI"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script var: "<i class="m_6719180117000445463moz-txt-slash"><span class="m_6719180117000445463moz-txt-tag">/</span>wiki<span class="m_6719180117000445463moz-txt-tag">/</span></i>"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "REQUEST_URI: <i class="m_6719180117000445463moz-txt-slash"><span class="m_6719180117000445463moz-txt-tag">/</span>wiki<span class="m_6719180117000445463moz-txt-tag">/</span></i>"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "DOCUMENT_URI"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script var: "/wiki/index.php"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "DOCUMENT_URI: /wiki/index.php"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "DOCUMENT_ROOT"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script var: "/home/www/<a moz-do-not-send="true" href="http://isotoperesearch.ca" target="_blank">isotoperesearch.ca</a>"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "DOCUMENT_ROOT: /home/www/<a moz-do-not-send="true" href="http://isotoperesearch.ca" target="_blank">isotoperesearch.ca</a>"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "SERVER_PROTOCOL"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script var: "HTTP/1.1"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "SERVER_PROTOCOL: HTTP/1.1"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "GATEWAY_INTERFACE"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "CGI/1.1"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "GATEWAY_INTERFACE: CGI/1.1"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "SERVER_SOFTWARE"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "nginx"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "SERVER_SOFTWARE: nginx"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "REMOTE_ADDR"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script var: "127.0.0.1"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "REMOTE_ADDR: 127.0.0.1"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "REMOTE_PORT"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script var: "56704"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "REMOTE_PORT: 56704"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "SERVER_ADDR"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script var: "127.0.0.1"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "SERVER_ADDR: 127.0.0.1"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "SERVER_PORT"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script var: "80"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "SERVER_PORT: 80"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script copy: "SERVER_NAME"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http script var: "localhost"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "SERVER_NAME: localhost"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "HTTP_TE: deflate,gzip;q=0.3"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "HTTP_CONNECTION: TE, close"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "HTTP_HOST: localhost"
2017/09/17 09:16:09 [debug] 21873#21873: *7 fastcgi param: "HTTP_USER_AGENT: lwp-request/6.15 libwww-perl/6.15"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http cleanup add: 09993C3C
2017/09/17 09:16:09 [debug] 21873#21873: *7 get rr peer, try: 1
2017/09/17 09:16:09 [debug] 21873#21873: *7 stream socket 6
2017/09/17 09:16:09 [debug] 21873#21873: *7 epoll add connection: fd:6 ev:80002005
2017/09/17 09:16:09 [debug] 21873#21873: *7 connect to unix:/var/run/php/php7.0-fpm.<wbr>sock, fd:6 #8
2017/09/17 09:16:09 [debug] 21873#21873: *7 connected
2017/09/17 09:16:09 [debug] 21873#21873: *7 http upstream connect: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 posix_memalign: 0998AA00:128 @16
2017/09/17 09:16:09 [debug] 21873#21873: *7 http upstream send request
2017/09/17 09:16:09 [debug] 21873#21873: *7 http upstream send request body
2017/09/17 09:16:09 [debug] 21873#21873: *7 chain writer buf fl:0 s:544
2017/09/17 09:16:09 [debug] 21873#21873: *7 chain writer in: 09993C5C
2017/09/17 09:16:09 [debug] 21873#21873: *7 writev: 544 of 544
2017/09/17 09:16:09 [debug] 21873#21873: *7 chain writer out: 00000000
2017/09/17 09:16:09 [debug] 21873#21873: *7 event timer add: 6: 90000:2415705830
2017/09/17 09:16:09 [debug] 21873#21873: *7 http finalize request: -4, "/wiki/index.php?" a:1, c:3
2017/09/17 09:16:09 [debug] 21873#21873: *7 http request count:3 blk:0
2017/09/17 09:16:09 [debug] 21873#21873: *7 http finalize request: -4, "/wiki/index.php?" a:1, c:2
2017/09/17 09:16:09 [debug] 21873#21873: *7 http request count:2 blk:0
2017/09/17 09:16:09 [debug] 21873#21873: *7 http run request: "/wiki/index.php?"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http upstream check client, write event:1, "/wiki/index.php"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http upstream request: "/wiki/index.php?"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http upstream dummy handler
2017/09/17 09:16:09 [debug] 21873#21873: *7 http upstream request: "/wiki/index.php?"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http upstream process header
2017/09/17 09:16:09 [debug] 21873#21873: *7 malloc: 09999E18:4096
2017/09/17 09:16:09 [debug] 21873#21873: *7 recv: eof:1, avail:1
2017/09/17 09:16:09 [debug] 21873#21873: *7 recv: fd:6 72 of 4096
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 01
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 06
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 00
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 01
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 00
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 2A
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 06
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 00
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record length: 42
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi parser: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi header: "Content-type: text/html; charset=UTF-8"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi parser: 1
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi header done
2017/09/17 09:16:09 [debug] 21873#21873: *7 posix_memalign: 0998F000:4096 @16
2017/09/17 09:16:09 [debug] 21873#21873: *7 HTTP/1.1 200 OK
Server: nginx/1.12.0
Date: Sun, 17 Sep 2017 13:16:09 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: close
2017/09/17 09:16:09 [debug] 21873#21873: *7 write new buf t:1 f:0 0998F010, pos 0998F010, size: 165 file: 0, size: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 http write filter: l:0 f:0 s:165
2017/09/17 09:16:09 [debug] 21873#21873: *7 http cacheable: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 http upstream process upstream
2017/09/17 09:16:09 [debug] 21873#21873: *7 pipe read upstream: 1
2017/09/17 09:16:09 [debug] 21873#21873: *7 pipe preread: 22
2017/09/17 09:16:09 [debug] 21873#21873: *7 readv: eof:1, avail:0
2017/09/17 09:16:09 [debug] 21873#21873: *7 readv: 1, last:4024
2017/09/17 09:16:09 [debug] 21873#21873: *7 pipe recv chain: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 pipe buf free s:0 t:1 f:0 09999E18, pos 09999E4A, size: 22 file: 0, size: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 pipe length: -1
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 01
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 03
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 00
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 01
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 00
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 08
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 00
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record byte: 00
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi record length: 8
2017/09/17 09:16:09 [debug] 21873#21873: *7 http fastcgi sent end request
2017/09/17 09:16:09 [debug] 21873#21873: *7 free: 09999E18
2017/09/17 09:16:09 [debug] 21873#21873: *7 pipe write downstream: 1
2017/09/17 09:16:09 [debug] 21873#21873: *7 pipe write downstream done
2017/09/17 09:16:09 [debug] 21873#21873: *7 event timer: 6, old: 2415705830, new: 2415705831
2017/09/17 09:16:09 [debug] 21873#21873: *7 http upstream exit: 00000000
2017/09/17 09:16:09 [debug] 21873#21873: *7 finalize http upstream request: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 finalize http fastcgi request
2017/09/17 09:16:09 [debug] 21873#21873: *7 free rr peer 1 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 close http upstream connection: 6
2017/09/17 09:16:09 [debug] 21873#21873: *7 free: 0998AA00, unused: 88
2017/09/17 09:16:09 [debug] 21873#21873: *7 event timer del: 6: 2415705830
2017/09/17 09:16:09 [debug] 21873#21873: *7 reusable connection: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 http upstream temp fd: -1
2017/09/17 09:16:09 [debug] 21873#21873: *7 http output filter "/wiki/index.php?"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http copy filter: "/wiki/index.php?"
2017/09/17 09:16:09 [debug] 21873#21873: *7 image filter
2017/09/17 09:16:09 [debug] 21873#21873: *7 http postpone filter "/wiki/index.php?" BFEBBC94
2017/09/17 09:16:09 [debug] 21873#21873: *7 http chunk: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 write old buf t:1 f:0 0998F010, pos 0998F010, size: 165 file: 0, size: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 write new buf t:0 f:0 00000000, pos 080F0A8B, size: 5 file: 0, size: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 http write filter: l:1 f:0 s:170
2017/09/17 09:16:09 [debug] 21873#21873: *7 http write filter limit 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 writev: 170 of 170
2017/09/17 09:16:09 [debug] 21873#21873: *7 http write filter 00000000
2017/09/17 09:16:09 [debug] 21873#21873: *7 http copy filter: 0 "/wiki/index.php?"
2017/09/17 09:16:09 [debug] 21873#21873: *7 http finalize request: 0, "/wiki/index.php?" a:1, c:1
2017/09/17 09:16:09 [debug] 21873#21873: *7 http request count:1 blk:0
2017/09/17 09:16:09 [debug] 21873#21873: *7 http close request
2017/09/17 09:16:09 [debug] 21873#21873: *7 http log handler
2017/09/17 09:16:09 [debug] 21873#21873: *7 free: 00000000
2017/09/17 09:16:09 [debug] 21873#21873: *7 free: 09992DB0, unused: 4
2017/09/17 09:16:09 [debug] 21873#21873: *7 free: 0998F000, unused: 3418
2017/09/17 09:16:09 [debug] 21873#21873: *7 close http connection: 4
2017/09/17 09:16:09 [debug] 21873#21873: *7 reusable connection: 0
2017/09/17 09:16:09 [debug] 21873#21873: *7 free: 099AEEE8
2017/09/17 09:16:09 [debug] 21873#21873: *7 free: 0998ACC0, unused: 24</pre><div><div class="h5">
<div class="m_6719180117000445463moz-cite-prefix">Le 2017-09-17 à 08:28, Anoop Alias a
écrit :
</div>
<blockquote type="cite">
<div dir="ltr">try changing
<div>
</div>
<div>##############################</div>
<div>
<div>
</div>
<div>location = /wiki {</div>
<div> root /home/www/<a moz-do-not-send="true" href="http://isotoperesearch.ca/wiki" target="_blank">isotoperesearch.ca/<wbr>wiki</a>;</div>
<div> fastcgi_index index.php;</div>
<div> index index.php;</div>
<div> include fastcgi_params;</div>
<div> fastcgi_pass unix:/var/run/php/php7.0-fpm.<wbr>sock;</div>
<div>
</div>
<div>}</div>
</div>
<div>
</div>
<div>##############################</div>
<div>to</div>
<div>
</div>
<div>##############################<wbr>###</div>
<div>
<div>
</div>
<div>location /wiki/ {</div>
<div> # root /home/www/<a moz-do-not-send="true" href="http://isotoperesearch.ca/wiki" target="_blank">isotoperesearch.ca/<wbr>wiki</a>;</div>
<div> fastcgi_index index.php;</div>
<div> index /wiki/index.php;</div>
<div> include fastcgi_params;</div>
<div> fastcgi_pass unix:/var/run/php/php7.0-fpm.<wbr>sock;</div>
<div>
</div>
<div>}</div>
</div>
<div>
</div>
<div>##############################<wbr>########3</div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">On Sun, Sep 17, 2017 at 5:48 PM,
Etienne Robillard <span dir="ltr"><<a moz-do-not-send="true" href="mailto:tkadm30@yandex.com" target="_blank">tkadm30@yandex.com</a>></span>
wrote:
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,
I'm trying to configure nginx with php-fpm to run mediawiki
in a distinct location (/wiki).
Here's my config:
# configuration file /etc/nginx/nginx.conf:
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 512;
multi_accept on;
use epoll;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 80;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3,
ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip off;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json
application/javascript text/xml application/xml
application/xml+rss text/javascript;
##
# Virtual Host Configs
##
#<a moz-do-not-send="true" href="http://isotopesoftware.ca" rel="noreferrer" target="_blank">isotopesoftware.ca</a>:
#include /etc/nginx/conf.d/development.<wbr>conf;
include /etc/nginx/conf.d/isotoperesea<wbr>rch.conf;
#include /etc/nginx/sites-enabled/*;
}
server {
# static medias web server configuration, for
development
# and testing purposes.
listen 80;
server_name localhost;
error_log /var/log/nginx/error_log; #debug
root /home/www/<a moz-do-not-send="true" href="http://isotoperesearch.ca" rel="noreferrer" target="_blank">isotoperesearch.ca</a>;
#autoindex on;
client_max_body_size 5m;
client_body_timeout 60;
location / {
# # host and port to fastcgi server
#uwsgi_pass django; # 8808=<a moz-do-not-send="true" href="http://gthc.org" rel="noreferrer" target="_blank">gthc.org</a>;
8801=tm
#include uwsgi_params;
fastcgi_pass <a moz-do-not-send="true" href="http://127.0.0.1:8808" rel="noreferrer" target="_blank">127.0.0.1:8808</a>;
include fastcgi_params;
}
# debug url rewriting to the error log
rewrite_log on;
location /media {
autoindex on;
gzip on;
}
location /pub {
autoindex on;
gzip on;
}
location /webalizer {
autoindex on;
gzip on;
#auth_basic "Private Property";
#auth_basic_user_file /etc/nginx/.htpasswd;
allow 67.68.76.70;
deny all;
}
location /documentation {
autoindex on;
gzip on;
}
location /moin_static184 {
autoindex on;
gzip on;
}
location /favicon.ico {
empty_gif;
}
location /robots.txt {
root /home/www/<a moz-do-not-send="true" href="http://isotopesoftware.ca" rel="noreferrer" target="_blank">isotopesoftware.ca</a>;
}
location /sitemap.xml {
root /home/www/<a moz-do-not-send="true" href="http://isotopesoftware.ca" rel="noreferrer" target="_blank">isotopesoftware.ca</a>;
}
#location /public_html {
# root /home/www/;
# autoindex on;
#}
# redirect server error pages to the static page
/50x.html
#error_page 404 /404.html;
#error_page 403 /403.html;
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root /var/www/nginx-default;
#}
include conf.d/mediawiki.conf;
#include conf.d/livestore.conf;
}
# configuration file /etc/nginx/fastcgi_params:
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
#fastcgi_param REMOTE_USER $remote_user;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
#XXX
#fastcgi_param HTTP_IF_NONE_MATCH $http_if_none_match;
#fastcgi_param HTTP_IF_MODIFIED_SINCE
$http_if_modified_since;
# PHP only, required if PHP was built with
--enable-force-cgi-redirect
# fastcgi_param REDIRECT_STATUS 200;
fastcgi_send_timeout 90;
fastcgi_read_timeout 90;
fastcgi_connect_timeout 40;
#fastcgi_cache_valid 200 304 10m;
#fastcgi_buffer_size 128k;
#fastcgi_buffers 8 128k;
#fastcgi_busy_buffers_size 256k;
#fastcgi_temp_file_write_size 256k;
# configuration file /etc/nginx/conf.d/<a moz-do-not-send="true" href="http://mediawiki.co" target="_blank">mediawiki.co</a><wbr>nf:
location = /wiki {
root /home/www/<a moz-do-not-send="true" href="http://isotoperesearch.ca/wiki" rel="noreferrer" target="_blank">isotoperesearch.ca/w<wbr>iki</a>;
fastcgi_index index.php;
index index.php;
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php7.0-fpm.s<wbr>ock;
}
#location @mediawiki {
# rewrite ^/(.*)$ /index.php;
#}
The issue is that the default "/" location is masking the
fastcgi_pass directive in the wiki block.
Is there any ways to run php-fpm in a location block ?
Thank you in advance,
Etienne
______________________________<wbr>_________________
nginx mailing list
<a moz-do-not-send="true" href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a>
<a moz-do-not-send="true" href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailm<wbr>an/listinfo/nginx</a>
</blockquote>
</div>
<div>
</div>
--
<div class="m_6719180117000445463gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div><b>Anoop P Alias</b>
<div>
</div>
</div>
</div>
</div>
</div>
<fieldset class="m_6719180117000445463mimeAttachmentHeader"></fieldset>
<pre>______________________________<wbr>_________________
nginx mailing list
<a moz-do-not-send="true" class="m_6719180117000445463moz-txt-link-abbreviated" href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a>
<a moz-do-not-send="true" class="m_6719180117000445463moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a></pre>
</blockquote>
</div></div><span class="HOEnZb"><font color="#888888"><pre class="m_6719180117000445463moz-signature" cols="72">--
Etienne Robillard
<a moz-do-not-send="true" class="m_6719180117000445463moz-txt-link-abbreviated" href="mailto:tkadm30@yandex.com" target="_blank">tkadm30@yandex.com</a>
<a moz-do-not-send="true" class="m_6719180117000445463moz-txt-link-freetext" href="http://www.isotopesoftware.ca/" target="_blank">http://www.isotopesoftware.ca/</a></pre>
</font></span></div>
</blockquote></div>
<div>
</div>--
<div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><b>Anoop P Alias</b> <div>
</div></div></div></div>
</div>
</blockquote>
</body></html>