WordPress in subdirectory installieren

Hallo,

Auf einem vhost sollen mehrere WordPress Installationen laufen. Neben der Hauptinstallation sollen die anderen in einem Unterordner laufen. So in der Art:
Die Hauptinstallation läuft einwandfrei. Die Installation im Unterordner läuft nur ohne aktivierten Permalinks. Sobald die Permalinks aktiviert werden bekomme ich einen 500er Fehler.
2021/05/07 13:42:56 [error] 125247#125247: *1497 rewrite or internal redirection cycle while internally redirecting to "/index.php", client: 2a03:4000::1, server: example.com, request: "GET /wordpress01/wp-json/wp/v2/types/post?context=edit HTTP/1.1", host: "example.com", referrer: "https://example.com/wordpress01/wp-json/wp/v2/types/post?context=edit"

Die vhosts sieht so aus:

NGINX:
        server_name example.com www.example.com;

        root   /var/www/example.com/web/;

        if ($scheme != "https") {
            return 301  https://$http_host$request_uri;
        }
        if ($http_host = "www.example.com") {
            return 301 $scheme://example.com$request_uri;
        }


        index index.php index.htm index.html index.cgi index.pl index.xhtml;


        location ~ \.shtml$ {
            ssi on;
        }


        error_log /var/log/ispconfig/httpd/example.com/error.log;
        access_log /var/log/ispconfig/httpd/example.com/access.log combined;

        location ~ /\. {
                        deny all;
        }

        location ^~ /.well-known/acme-challenge/ {
                        access_log off;
                        log_not_found off;
                        auth_basic off;
                        root /usr/local/ispconfig/interface/acme/;
                        autoindex off;
                        index index.html;
                        try_files $uri $uri/ =404;
        }

 
        location = /favicon.ico {
            log_not_found off;
            access_log off;
            expires max;
            add_header Cache-Control "public, must-revalidate, proxy-revalidate";
        }

        location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;
        }

        location /stats/ {

            index index.html index.php;
            auth_basic "Members Only";
            auth_basic_user_file /var/www/clients/client1/web20/web//stats/.htpasswd_stats;
        }

        location ^~ /awstats-icon {
            alias /usr/share/awstats/icon;
        }

        location ~ \.php$ {
            try_files /a8951d98fb4447b31d02fb0e77ce12dd.htm @php;
        }

        location / {
            try_files $uri $uri/ /index.php?$args;
        }

        location @php {
            try_files $uri $uri/ /index.php?$args;
            include /etc/nginx/fastcgi_params;
            fastcgi_pass unix:/var/lib/php7.4-fpm/web20.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_intercept_errors on;
        }




        location ~* ^/xmlrpc.php$ {
        return 403;
        }




}
Ich habe schon ein dutzend an Howtos und Fehlerbehebungen gelesen und probiert. Nichts hat geholfen. Jetzt hoffe ich hier auf den entscheidenden Tipp.

Vielen Dank im voraus.
 

Till

Administrator
Ich würde Dir auch raten, nimm entweder subdomains für die einzelnen instanzen oder installier bzw. konfiguruere WordpressMU, also die WordPress multi instanz version.
 

Werbung

Top