Nginx forum in subdir

  • Betroffene Version
    WoltLab Suite 3.0

    So i just cleaned up my nginx vhost with the following BB nginx code:

    Code
    location /forum/ {
        index index.php;
    
        try_files $uri $uri/ @forum;
    }
    location @forum {
        rewrite ^/(forum/|cms/|wcf/|core/|calendar/|filebase/|blog/|gallery/)?([^.]+)$ /$1index.php?$2 last;
    }
    
    <drupal Vhost code goes here>

    but with this i can't install a package and i can't access anything other then topics and the admin control panel.

    The setup is as follows:

    domain.tld(drupal site)
    domain.tld/forum --->burning board

    • Offizieller Beitrag

    Your rewrite doesn't make any sense, because ^/… is absolute to the domain root. Change it to read rewrite ^/forum/(cms/|wcf/|…, and you should be done.

    Alexander Ebert
    Senior Developer WoltLab® GmbH

  • This fixed it for me:

    Code
    location /forum/ {
        index index.php;
    
        try_files $uri $uri/ @forum;
    }
    
    location @forum {
        rewrite ^/forum/(core/|cms/|wcf/|calendar/|filebase/|blog/|gallery/)?([^.]+)$ /forum/$1index.php?$2 last;
    }

    Thanks :)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!