MyBB Community Forums

Full Version: Wrong admin login url behind proxy
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using an nginx server to map mydomain/forum to mybb, with the following configuration:

<code>
server {
    listen 80;
    hostname mydomain;

    location /forum/ {
        proxy_pass http://localhost:8008/
    }

    # other servers
}

server {
    listen 8008;
    hostname localhost;

    location / {
        root /path/to/mybb;
        # php-fpm stuff
    }
}

However, in admin/inc/class_page.php:477 the login form is constructed with $_SERVER['PHP_SELF'], which will result in /admin/index.php and thus result in a different location.
You could always use PHP PFM rather than proxying to apache and avoid this problem Wink