• I have a domain c3summitllc.com and would like this domain to forward to c3summit2019.com, however, under this domain, I want to have the WordPress multi-site work correctly. This was working under lighttpd however things broke when we migrated.

    These URLs do not work correctly, they are supposed to be sites in themselves:

    Any insights on how to mend this issue will be appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Your server blocks are probably not set up correctly to not redirect requests for those other sites. See if the accepted answer here gives you better guidance.

    Thread Starter borntodeal

    (@borntodeal)

    bcworkz, I am an utter newbie. A mere Padawan learner, oh Jedi Master!

    Here is the server block for

    ***start***

    
    server {
            listen 80;
            listen [::]:80;
    
            root /var/www/html/c3/c3summitllc.com;
    
            # Add index.php to the list if you are using PHP
            index index.html index.htm index.nginx-debian.html index.php;
    
            server_name c3summitllc.com www.c3summitllc.com;
    
            if (!-e $request_filename) {
                rewrite /wp-admin$ $scheme://$host$uri/ permanent;
                rewrite ^(/[^/]+)?(/wp-.*) $2 last;
                rewrite ^(/[^/]+)?(/.*\.php) $2 last;
            }
    
            location / {
                    try_files $uri $uri/ /index.php?$args;
            }
    
            # pass PHP scripts to FastCGI server
            #
            location ~ \.php$ {
                    include snippets/fastcgi-php.conf;
            #       # With php-fpm (or other unix sockets):
                    fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
            }
    }
    
    ***end***
    

    This block needs to accomplish three things:

    All requests to domain should redirect to another domain

    All requests to these paths must open the individual multi-sites (there are two different sites):

    These URLs do not work correctly, they are supposed to be sites in themselves:

    How would I configure this to work properly now?

    Multisites seem to work best in a more narrow config.

    I’d probably lose the Nginx in favor of Apache where I know I can make a multisite behave. Multisite loves htaccess and Nginx needs the htaccess ‘toys’ placed in its config instead.

    You can later use Nginx for a nice proxy out in front of that multisite… or you can just use Cloudflare instead!

    Nothing wrong with Nginx… I love the hosts who give you Apache with an Nginx out front pre-configured as a proxy box.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multi-Site Issue after Migrating to NGINX’ is closed to new replies.