Support » Networking WordPress » nginx rewrites for mu

  • tofutim


    Help! I’ve setup mu subdirectory and I’m running into issues where the child site php are not resolving properly. When I go to*.php, I keep getting the dreaded No input file specified. I am using php5-fpm and nginx.

            listen 443 default ssl;
            ssl_certificate         /etc/ssl/certs/myserver_crt.pem;
            ssl_certificate_key     /etc/ssl/private/myserver_key.pem;
            keepalive_timeout       70;
            server_name; #change this to the domain name, for example$
            access_log /var/log/wordpress.access_log;
            error_log /var/log/wordpress.error_log;
            server_name_in_redirect off;
            port_in_redirect off;
            location / {
              root /var/www/wordpress;
              index index.php index.html index.htm;
              # this serves static files that exist without running other rewrite t$
              if (-f $request_filename) {
                  expires 30d;
              # multisite
              rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$1 last;
              # this sends all non-existing file or directory requests to index.php
              if (!-e $request_filename) {
    #               rewrite ^.+?(/.*\.txt)$ $1 last;
                    rewrite ^.+/?(/wp-.*) $1 last;
                    rewrite ^.+/?(/.*\.php)$ $1 last;
                    rewrite ^(.+)$ /index.php?q=$1 last;
            location ~ \.php$ {
                fastcgi_index   index.php;
                fastcgi_param   SCRIPT_FILENAME /var/www/wordpress$fastcgi_script_n$
                include         /etc/nginx/fastcgi_params;
  • The topic ‘nginx rewrites for mu’ is closed to new replies.