Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9185331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:15:07+00:00 2026-06-17T19:15:07+00:00

I have mediawiki installed. All is right in the world except for when I

  • 0

I have mediawiki installed. All is right in the world except for when I try to alias a external directory (webalizer web stats). I see that Nginx passes off the request to /usage/* to PHP/Mediawiki. I don’t want that. I literally want everything under /usage/ to point to my alias and nothing else. Completely separate from Mediawiki code and functionality.

# in no way related to Mediawiki. I just want to serve this as static HTML.
location /usage {
    alias /var/www/webalizer/wiki.longnow.org/;
}

# This answers to anything, which may be my problem
location / {
    try_files $uri $uri/ @rewrite;
    index index.php;
}

# A special rewrite to play nicely with Mediawiki
location @rewrite {
    rewrite ^/(.*)$ /index.php?title=$1&$args;
}

# PHP, nom nom nom
location ~ \.php$ {
    include fastcgi_params;
    fastcgi_index index.php;
    fastcgi_pass unix:/tmp/php-fastcgi.socket;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

I was hoping that listing the /usage location directive ahead of the rest would short-circuit the system, but I have been spoiled by Django 😉

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:15:08+00:00Added an answer on June 17, 2026 at 7:15 pm

    To stop Nginx from processing further location directives, it should be prefixed by ^~.
    I think you will still want a try_files falling back to a 404 response inside the location.

    location ^~ /usage {
        alias /var/www/webalizer/wiki.longnow.org/;
        try_files $uri $uri/ =404;    
    }
    

    See http://wiki.nginx.org/HttpCoreModule#location for reference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have MediaWiki 1.13.3 installed and it has been working fine for a couple
I have created an extension for mediawiki that works in all major browsers other
I had just installed MediaWiki. What must I do to have wikipedia style templates
I am trying to use HTML::WikiConverter::MediaWiki which I have installed using yum install perl-HTML-WikiConverter-MediaWiki.noarch
I built my own login system, and I also have a MediaWiki installed for
Please have a look at www.mediawiki.org using Chrome and try increasing/decreasing the page zoom
I have installed MediaWiki (mediawiki-1.17.0) on Ubuntu 11.04, and it appears to be working
I have an instance of mediawiki installed with an extension called Confirm Account .
Using mediawiki. I have installed the extension http://www.mediawiki.org/wiki/Extension:Contribution_Credits , which is called with the
I have played with the idea of using a wiki (MediaWiki) to centralize all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.