<div dir="ltr">try changing<div><br></div><div>##############################</div><div><div><br></div><div>location = /wiki {</div><div>      root /home/www/<a href="http://isotoperesearch.ca/wiki">isotoperesearch.ca/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.sock;</div><div><br></div><div>}</div></div><div><br></div><div>##############################</div><div>to</div><div><br></div><div>#################################</div><div><div><br></div><div>location /wiki/ {</div><div>      # root /home/www/<a href="http://isotoperesearch.ca/wiki">isotoperesearch.ca/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.sock;</div><div><br></div><div>}</div></div><div><br></div><div>######################################3</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 17, 2017 at 5:48 PM, Etienne Robillard <span dir="ltr"><<a 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">Hi,<br>
<br>
I'm trying to configure nginx with php-fpm to run mediawiki in a distinct location (/wiki).<br>
<br>
Here's my config:<br>
<br>
# configuration file /etc/nginx/nginx.conf:<br>
user www-data;<br>
worker_processes 4;<br>
pid /run/nginx.pid;<br>
<br>
events {<br>
    worker_connections 512;<br>
    multi_accept on;<br>
    use epoll;<br>
}<br>
<br>
http {<br>
<br>
    ##<br>
    # Basic Settings<br>
    ##<br>
<br>
    sendfile on;<br>
    tcp_nopush on;<br>
    tcp_nodelay on;<br>
    keepalive_timeout 80;<br>
    types_hash_max_size 2048;<br>
    # server_tokens off;<br>
<br>
    # server_names_hash_bucket_size 64;<br>
    # server_name_in_redirect off;<br>
<br>
    include /etc/nginx/mime.types;<br>
    default_type application/octet-stream;<br>
<br>
    ##<br>
    # SSL Settings<br>
    ##<br>
<br>
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE<br>
    ssl_prefer_server_ciphers on;<br>
<br>
    ##<br>
    # Logging Settings<br>
    ##<br>
<br>
    access_log /var/log/nginx/access.log;<br>
    error_log /var/log/nginx/error.log;<br>
<br>
    ##<br>
    # Gzip Settings<br>
    ##<br>
<br>
    gzip off;<br>
    gzip_disable "msie6";<br>
<br>
    # gzip_vary on;<br>
    # gzip_proxied any;<br>
    # gzip_comp_level 6;<br>
    # gzip_buffers 16 8k;<br>
    # gzip_http_version 1.1;<br>
    # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;<br>
<br>
    ##<br>
    # Virtual Host Configs<br>
    ##<br>
<br>
    #<a href="http://isotopesoftware.ca" rel="noreferrer" target="_blank">isotopesoftware.ca</a>:<br>
    #include /etc/nginx/conf.d/development.<wbr>conf;<br>
    include /etc/nginx/conf.d/isotoperesea<wbr>rch.conf;<br>
    #include /etc/nginx/sites-enabled/*;<br>
}<br>
<br>
server {<br>
<br>
    # static medias web server configuration, for development<br>
    # and testing purposes.<br>
<br>
    listen       80;<br>
    server_name  localhost;<br>
    error_log /var/log/nginx/error_log; #debug<br>
    root /home/www/<a href="http://isotoperesearch.ca" rel="noreferrer" target="_blank">isotoperesearch.ca</a>;<br>
    #autoindex on;<br>
    client_max_body_size 5m;<br>
    client_body_timeout 60;<br>
<br>
    location / {<br>
    #    # host and port to fastcgi server<br>
        #uwsgi_pass django; # 8808=<a href="http://gthc.org" rel="noreferrer" target="_blank">gthc.org</a>; 8801=tm<br>
        #include uwsgi_params;<br>
        fastcgi_pass <a href="http://127.0.0.1:8808" rel="noreferrer" target="_blank">127.0.0.1:8808</a>;<br>
        include fastcgi_params;<br>
    }<br>
<br>
<br>
    # debug url rewriting to the error log<br>
    rewrite_log on;<br>
<br>
    location /media {<br>
        autoindex on;<br>
        gzip on;<br>
    }<br>
<br>
    location /pub {<br>
        autoindex on;<br>
        gzip on;<br>
    }<br>
<br>
    location /webalizer {<br>
        autoindex on;<br>
        gzip on;<br>
    #auth_basic "Private Property";<br>
    #auth_basic_user_file /etc/nginx/.htpasswd;<br>
        allow 67.68.76.70;<br>
    deny all;<br>
    }<br>
<br>
    location /documentation {<br>
        autoindex on;<br>
        gzip on;<br>
    }<br>
<br>
    location /moin_static184 {<br>
    autoindex on;<br>
    gzip on;<br>
    }<br>
    location /favicon.ico {<br>
    empty_gif;<br>
    }<br>
    location /robots.txt {<br>
         root /home/www/<a href="http://isotopesoftware.ca" rel="noreferrer" target="_blank">isotopesoftware.ca</a>;<br>
    }<br>
    location /sitemap.xml {<br>
    root /home/www/<a href="http://isotopesoftware.ca" rel="noreferrer" target="_blank">isotopesoftware.ca</a>;<br>
    }<br>
<br>
    #location /public_html {<br>
    # root /home/www/;<br>
    # autoindex on;<br>
    #}<br>
    # redirect server error pages to the static page /50x.html<br>
    #error_page 404 /404.html;<br>
    #error_page 403    /403.html;<br>
    #error_page 500 502 503 504  /50x.html;<br>
    #location = /50x.html {<br>
    #    root   /var/www/nginx-default;<br>
    #}<br>
<br>
    include conf.d/mediawiki.conf;<br>
    #include conf.d/livestore.conf;<br>
}<br>
<br>
<br>
# configuration file /etc/nginx/fastcgi_params:<br>
fastcgi_param  PATH_INFO          $fastcgi_script_name;<br>
fastcgi_param  QUERY_STRING       $query_string;<br>
fastcgi_param  REQUEST_METHOD     $request_method;<br>
fastcgi_param  CONTENT_TYPE       $content_type;<br>
fastcgi_param  CONTENT_LENGTH     $content_length;<br>
<br>
fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;<br>
fastcgi_param  REQUEST_URI        $request_uri;<br>
fastcgi_param  DOCUMENT_URI       $document_uri;<br>
fastcgi_param  DOCUMENT_ROOT      $document_root;<br>
fastcgi_param  SERVER_PROTOCOL    $server_protocol;<br>
<br>
fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;<br>
fastcgi_param  SERVER_SOFTWARE    nginx;<br>
<br>
fastcgi_param  REMOTE_ADDR        $remote_addr;<br>
fastcgi_param  REMOTE_PORT        $remote_port;<br>
#fastcgi_param  REMOTE_USER      $remote_user;<br>
fastcgi_param  SERVER_ADDR        $server_addr;<br>
fastcgi_param  SERVER_PORT        $server_port;<br>
fastcgi_param  SERVER_NAME        $server_name;<br>
<br>
<br>
#XXX<br>
#fastcgi_param HTTP_IF_NONE_MATCH $http_if_none_match;<br>
#fastcgi_param HTTP_IF_MODIFIED_SINCE $http_if_modified_since;<br>
<br>
<br>
# PHP only, required if PHP was built with --enable-force-cgi-redirect<br>
# fastcgi_param  REDIRECT_STATUS    200;<br>
<br>
fastcgi_send_timeout 90;<br>
fastcgi_read_timeout 90;<br>
fastcgi_connect_timeout 40;<br>
#fastcgi_cache_valid 200 304 10m;<br>
#fastcgi_buffer_size 128k;<br>
#fastcgi_buffers 8 128k;<br>
#fastcgi_busy_buffers_size 256k;<br>
#fastcgi_temp_file_write_size 256k;<br>
<br>
<br>
# configuration file /etc/nginx/conf.d/<a href="http://mediawiki.co">mediawiki.co</a><wbr>nf:<br>
<br>
<br>
location = /wiki {<br>
      root /home/www/<a href="http://isotoperesearch.ca/wiki" rel="noreferrer" target="_blank">isotoperesearch.ca/w<wbr>iki</a>;<br>
      fastcgi_index index.php;<br>
      index index.php;<br>
      include fastcgi_params;<br>
      fastcgi_pass unix:/var/run/php/php7.0-fpm.s<wbr>ock;<br>
<br>
}<br>
<br>
#location @mediawiki {<br>
#    rewrite ^/(.*)$ /index.php;<br>
#}<br>
<br>
<br>
The issue is that the default "/" location is masking the fastcgi_pass directive in the wiki block.<br>
<br>
Is there any ways to run php-fpm in a location block ?<br>
<br>
<br>
Thank you in advance,<br>
<br>
Etienne<br>
<br>
<br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailm<wbr>an/listinfo/nginx</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><b>Anoop P Alias</b> <div><br></div></div></div></div>
</div>