From ArchWiki

Email configuration

Looking through MediaWiki wiki and mailing lists I noticed email is not supported out of the box.

Found this needs to be added to LocalSettings.php ($wgSMTP):

   $wgSMTP = array(
       'host' => 'ssl://',
       'IDHost' => '',
       'port' => 465,
       'username' => '',
       'password' => 'yourEmailPassword',
       'auth' => true

But it seems there are some php libs that need installing ( quote:

   `running "pear install mail" and possibly "pear install Net_SMTP"`

I'd love to do this but I run my mediawiki in chroot so there will be a challange of chrooting pear too?

Gregosky (talk) 14:16, 22 June 2016 (UTC)Reply[reply]

I found it to work out of the box if you have an email server installed, which is the easiest solution anyway, instead of routing all of your traffic to Google, I’d suggest to leave it as-is. Perhaps also add a link to OpenSMTPD for people who don’t already have one? Link Mauve (talk) 14:38, 22 June 2016 (UTC)Reply[reply]

nginx configuration doesn't work


The title sums it up. I've tried setting up MediaWiki by carefully following every steps listed in the wiki, since I have no previous knowledge of nginx.

I may have missed something. But just in case, can someone double check and try the configuration in a clean environment?

Best regards. —This unsigned comment is by E966d2a4 (talk) 09:59, 23 April 2018. Please sign your posts with ~~~~!

MediaWiki's Apache configuration file

I've set up PHP with Apache as per Apache_HTTP_Server#Using_apache2-mpm-worker_and_mod_fcgid, then continued with the instructions on this Wiki page at MediaWiki#Apache. These tell you to use the example Apache configuration file supplied by the MediaWiki package. This contains the line:

php_admin_value open_basedir   "/usr/share/webapps/:/tmp/:/usr/bin/"

When I restart Apache, it complains about this line, stating:

Invalid command 'php_admin_value'...

If I comment out this line, Apache starts with no problem. Googling isn't too much help here, except to suggest that I need to load a PHP module within Apache for the command to be recognised. Is it possible that the problem line will only be accepted if you use the alternative PHP setup method, at Apache_HTTP_Server#Using_libphp? If so, how should I achieve the equivalent with my PHP setup? - Ghepardo (talk) 17:44, 4 May 2020 (UTC)Reply[reply]

Configuration for multiple Mediawiki instances

What would a proper config for multiple MW instances look like? Currently, I copied the files from /usr/shar/webapps/mediawiki to the respective folders, but that requires manual intervention on every update. Is there a better way? Fordprefect (talk) 10:43, 30 April 2021 (UTC)Reply[reply]

/mw-config/index.php is exposed with Nginx config

Using the Nginx config as shown in that section. The /mw-config/index.php path is still exposed after an installation is complete, which allows the LocalSettings.php file to still be downloaded.

By re-ordering the Nginx config file and placing the location match for mw-config before the location match for \.php$. This seems to have mitigated the problem by returning a 404 when attempting to access this path.

location ~ ^/(bin|docs|extensions|includes|maintenance|mw-config|resources|serialized|tests)/ {

location ~ \.php$ {
   include /etc/nginx/fastcgi_params;
   fastcgi_pass unix:/var/run/php-fpm7/php-fpm.sock;
   fastcgi_index index.php;
   fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
   try_files $uri @mediawiki;

Perhaps some additional wording is required to ensure that someone who has just setup a wiki does not leave /mw-config/index.php exposed.

--Jamesp9 (talk) 00:43, 15 December 2022 (UTC)Reply[reply]

Just to clarify, access to /mw-config/index.php is required for the first time for setup of a Wiki. Then once the setup is complete, ensure mw-config cannot be accessed. --Jamesp9 (talk) 00:27, 3 January 2023 (UTC)Reply[reply]