Wordpress Multiuser Install with Subfolder wp-admin redirect loop in Help

edited January 2016 in Help
Hello together,
I am having trouble with my Wordpress Install....

I had setup everything the way I expect it to run even on a server where i do not want to create Subdomains. So it had to be a subfolder Multiuser Install.

No problems setting the thing up, no probems at all after i figured most stuff out how these servers work.

I had created now a testsubfolder Account, wanted to go to the new Dashboard, but there came a redirect loop.

My first Idea was the htaccess Password Protect, but after I deleted this one, the problem persisted.

I have done everything the way I would do on a normal dedicated Server, as I said, WP IS running fine as it is... just the redirect loop when you try to login to the subaccount dashboard, thats a huge problem and makes everything I have done here useless, as I won't be able to use the blog as intended.

Any ideas what could cause the Problems?

Comments

  • Hi Rezzanjin,
    i am experiencing the same Problem.
    Did you solve the problem?

    Thx in advance
    Marc
  • ok. figured it out myself.
    The Wordpress App on CentOS 6 isnt configured for WP Multisite.

    Edit NGINX conf
    /etc/nginx/conf.d/wordpress_https.conf

    and add the following - worked for me

    ###############################

    upstream php-handler-https {
    server 127.0.0.1:9000;
    #server unix:/var/run/php5-fpm.sock;
    }

    server {
    listen 443 ssl default_server;
    server_name 45.77.141.xxx;
    #server_name wordpress.example.com;

    ssl_certificate /etc/nginx/ssl/server.crt;
    ssl_certificate_key /etc/nginx/ssl/server.key;

    root /var/www/html/;
    index index.php;

    # set max upload size
    client_max_body_size 2G;
    fastcgi_buffers 64 4K;

    access_log /var/log/nginx/wordpress_https_access.log combined;
    error_log /var/log/nginx/wordpress_https_error.log;

    location = /favicon.ico { log_not_found off; access_log off; }
    location = /robots.txt { access_log off; log_not_found off; }
    location / { try_files $uri $uri/ /index.php?$args ;}
    location ^~ /wp-admin/ {auth_basic "Restricted"; auth_basic_user_file /etc/nginx/htpasswd/wpadmin;
    location ~* \.(htaccess|htpasswd) {deny all;}

    location ~ \.php(?:$|/) {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param HTTPS on;
    fastcgi_pass php-handler-https;
    fastcgi_read_timeout 600s;
    }
    }

    location ~* \.(htaccess|htpasswd) {
    deny all;
    }

    location ~ \.php(?:$|/) {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param HTTPS on;
    fastcgi_pass php-handler-https;
    fastcgi_read_timeout 90000s;
    }

    # set long EXPIRES header on static assets
    location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
    expires 30d;
    access_log off;
    }



    if (!-e $request_filename) {
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    rewrite ^(/[^/]+)?(/wp-.*) $2 last;
    rewrite ^(/[^/]+)?(/.*\.php) $2 last;
    }
    set $cache_uri $request_uri;


    # POST requests and urls with a query string should always go to PHP
    if ($request_method = POST) {
    set $cache_uri 'NULL';
    }
    if ($query_string != "") {
    set $cache_uri 'NULL';
    }


    # Don't cache uris containing the following segments
    if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
    set $cache_uri 'NULL';
    }


    # Don't use the cache for logged in users or recent commenters
    if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") {
    set $cache_uri 'NULL';
    }


    # Use cached or actual file if they exists, otherwise pass request to WordPress
    # location / {
    #try_files /wp-content/cache/page_enhanced/${host}${cache_uri}_index.html $uri $uri/ /index.php?$args ;
    # }
    location ~ \.php$ {
    try_files $uri /index.php;
    include fastcgi_params;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    }
    location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
    access_log off; log_not_found off; expires max;
    }

    location ~ /\. { deny all; access_log off; log_not_found off; }



    }
    ############################################
    restart nginx after changes
    sudo service nginx restart

    hope this helps.
Sign In or Register to comment.

Registration Required

A VULTR.com account is required to use the forum. Click here to sign in.

Quick Links

In this Discussion