Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/mediawiki] 404 errors when overriding MEDIAWIKI_WIKI_PREFIX #64097

Closed
dunn opened this issue Mar 23, 2024 · 12 comments · Fixed by #64098
Closed

[bitnami/mediawiki] 404 errors when overriding MEDIAWIKI_WIKI_PREFIX #64097

dunn opened this issue Mar 23, 2024 · 12 comments · Fixed by #64098
Assignees
Labels
mediawiki solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@dunn
Copy link
Contributor

dunn commented Mar 23, 2024

Name and Version

bitnami/mediawiki:1

What architecture are you using?

amd64

What steps will reproduce the bug?

set a non-default value for the prefix in the docker compose environment:

- MEDIAWIKI_WIKI_PREFIX=/something

then run docker compose up

What is the expected behavior?

MediaWiki is accessible at /something instead of /wiki

What do you see instead?

Every page under /something returns a 404 error:

mediawiki-1  | mediawiki 22:25:41.93 INFO  ==> Running MediaWiki install script
mediawiki-1  | mediawiki 22:25:43.06 INFO  ==> Configuring MediaWiki settings
mediawiki-1  | mediawiki 22:25:43.07 INFO  ==> Setting MediaWiki short URLs
mediawiki-1  | mediawiki 22:25:43.08 INFO  ==> Persisting MediaWiki installation
mediawiki-1  | mediawiki 22:25:44.95 INFO  ==> ** MediaWiki setup finished! **
mediawiki-1  |
mediawiki-1  | mediawiki 22:25:44.95 INFO  ==> ** Starting Apache **
mediawiki-1  | [Sat Mar 23 22:25:45.180354 2024] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.58 (Unix) OpenSSL/3.0.11 configured -- resuming normal operations
mediawiki-1  | [Sat Mar 23 22:25:45.180392 2024] [core:notice] [pid 1] AH00094: Command line: '/opt/bitnami/apache/bin/httpd -f /opt/bitnami/apache/conf/httpd.conf -D FOREGROUND'
mediawiki-1  | 192.168.160.1 - - [23/Mar/2024:22:26:06 +0000] "GET / HTTP/1.1" 301 -
mediawiki-1  | 192.168.160.1 - - [23/Mar/2024:22:26:07 +0000] "GET /something/Main_Page HTTP/1.1" 404 196
mediawiki-1  | 192.168.160.1 - - [23/Mar/2024:22:26:07 +0000] "GET /favicon.ico HTTP/1.1" 404 196

Additional information

No response

@dunn dunn added the tech-issues The user has a technical issue about an application label Mar 23, 2024
@github-actions github-actions bot added the triage Triage is needed label Mar 23, 2024
@dunn dunn changed the title [bitnami/mediawiki] 404 errors when overriding [bitnami/mediawiki] 404 errors when overriding MEDIAWIKI_WIKI_PREFIX Mar 23, 2024
@dunn
Copy link
Contributor Author

dunn commented Mar 24, 2024

afaict the RewriteRule needs to match the prefix, instead of being hardcoded to /wiki: https://github.com/bitnami/containers/blob/main/bitnami/mediawiki/1/debian-12/rootfs/opt/bitnami/scripts/mediawiki/postunpack.sh#L50

But since postunpack.sh is run during the image build, it can't be overridden with environment variables.

@carrodher
Copy link
Member

Thank you for opening this issue and submitting the associated Pull Request. Our team will review and provide feedback. Once the PR is merged, the issue will automatically close.

Your contribution is greatly appreciated!

Copy link

github-actions bot commented Apr 9, 2024

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Apr 9, 2024
@dunn
Copy link
Contributor Author

dunn commented Apr 9, 2024

un-stale

Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
@dunn
Copy link
Contributor Author

dunn commented Apr 15, 2024

>:(

@javsalgar javsalgar reopened this Apr 18, 2024
@javsalgar javsalgar removed stale 15 days without activity solved labels Apr 18, 2024
Copy link

github-actions bot commented May 4, 2024

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label May 4, 2024
Copy link

github-actions bot commented May 9, 2024

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@github-actions github-actions bot added the solved label May 9, 2024
@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale May 9, 2024
@Ducatel
Copy link

Ducatel commented May 13, 2024

Hi seems I face a very similar issue.
I tried to run mediawiki 1.41.1 under kubernetes with env variables MEDIAWIKI_HOST, MEDIAWIKI_WIKI_PREFIX and I'm redirected without any domain when I reach the /

image

But If I enter a full URL like https://wiki-mydomain.com/index.php/Main_Page it's displayed. But if I click on any link, I will face a redirection without my domain name again

EDIT: For who face this issue seems @dunn is currently working on PR #64098. Thanks a lot ☜(゚ヮ゚☜)

@Ducatel
Copy link

Ducatel commented May 22, 2024

Hi,

Do you know when docker image will be available on hub with this fix ?
Thanks

@migruiz4
Copy link
Member

migruiz4 commented May 22, 2024

Hi @Ducatel,

The latest version of the bitnami/mediawiki image now includes the fix (1.41.1-debian-12-r8).

@Ducatel
Copy link

Ducatel commented May 22, 2024

Ok So still not working for me. let's open a dedicated one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mediawiki solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants