I have installed MediaWiki in my Ubuntu 18.04 and able to get it running properly. After that, I installed NextCloud which is also working fine. But the former stopped working .

Error: Not found. The requested URL was not found on this server.


  • Version: 1.34.0
  • PHP: 7.2
  • Path: var/www/html/mediawiki/mediawiki-1.34.0
  • URL: http://localhost/mediawiki/mediawiki-1.34.0/index.php/Main_Page
# mediawiki.conf
<VirtualHost *:80>
  ServerAdmin [email protected]
  DocumentRoot /var/www/html/mediawiki/
  ServerName http://localhost/mediawiki
  ServerAlias www.localhost/mediawiki
  <Directory /var/www/html/mediawiki/>
    Options +FollowSymLinks
    AllowOverride All
    Require all granted
  ErrorLog /var/log/apache2/media-error_log
  CustomLog /var/log/apache2/media-access_log common


  • Version: 19.0.0
  • PHP: 7.4
  • Path: var/www/nextcloud
  • URL: http://localhost/nextcloud/index.php/login
# nextcloud.conf
Alias /nextcloud "/var/www/nextcloud/"
<Directory /var/www/nextcloud/>
  Options +FollowSymlinks
  AllowOverride All
 <IfModule mod_dav.c>
  Dav off
 SetEnv HOME /var/www/nextcloud
 SetEnv HTTP_HOME /var/www/nextcloud

Apache 2:

# apache2.conf
<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted

Tried following approaches but to no avail:

I changed the values of AllowOverride and Require in mediawiki.conf

Ran following commands for mediawiki

sudo a2enmod rewrite
sudo service apache2 restart

Firewalls allow for http and https

How do I clear this? I suspect the problem is with Apache2 and Virtual Hosts

1 Answer 1

  1. You need to create and enable 2 separate Apache's virtual hosts as it is explained here.

  2. The server name directives must look like:

    ServerName wiki.local
    ServerName cloud.local
  3. Then you need to edit the /etc/hosts file of the client.

    • If the client is the same computer you could modify the relevant line to: localhost wiki.local cloud.local
    • If the client is another computer in the LAN: wiki.local cloud.local

      Where is the IP address of the computer that hosts the Apache server.

In addition, MediaWiki 1.34 experiencing some problems with php7.4. You can have only one version of php enabled, until you done special setup to run two versions at the same time. At my server MediaWiki 1.34 and NextCloud 18.0.7 works great with php7.3 -- here is how to enable it on Ubuntu 18.04: Upgrade to the latest PHP version in ubuntu 16.04

  • 1. I am using two separate conf files. As you can see the Nextcloud conf is not enclosed in VirtuaHost but it is working fine 2. I tried renaming the ServerName in both conf files and added those in to the /etc/hosts file but still getting the same issue. 3. I am using PHP7.2 for MediaWiki but 7.4 for the NextCloud. Do PHP7.4 installation itself causes any problems for MediaWiki 1.34 ? Thanks for the reply Jul 24, 2020 at 7:09
  • @Ender'sCode, you need to use <virtualhost> tags to tell Apache it is another virtual host. Yes it probably works, but apparently in wrong way ;-)
    – pa4080
    Jul 24, 2020 at 7:13
  • "Do PHP7.4 installation itself causes any problems for MediaWiki 1.34 ?" I do not think so, but some shell scripts of MediaWiki 1.34 will break with php7.4.
    – pa4080
    Jul 24, 2020 at 7:15
  • "I am using PHP7.2 for MediaWiki but 7.4 for the NextCloud" in which way did you tell Apache to use 7.2 for MW and 7.4 for NC?
    – pa4080
    Jul 24, 2020 at 7:16
  • I thought it did. Installed MediaWiki after PHP7.2 install. Same for NextCloud. My mistake. Jul 25, 2020 at 2:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .