Я установил MediaWiki в свой Ubuntu 18.04 и смог правильно запустить его. После этого я установил NextCloud, который также работает нормально. Но первый перестал работать.
Ошибка: не найдена. Запрошенный URL не найден на этом сервере.
MediaWiki :
# mediawiki.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
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
</Directory>
ErrorLog /var/log/apache2/media-error_log
CustomLog /var/log/apache2/media-access_log common
</VirtualHost>
NextCloud :
# nextcloud.conf
Alias /nextcloud "/var/www/nextcloud/"
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
</Directory>
Apache 2:
# apache2.conf
...
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
...
Пробовал следующие подходы, но безрезультатно:
Я изменил значения AllowOverride и требуют в MediaWiki. conf
Выполнить следующие команды для mediawiki
sudo a2enmod rewrite
sudo service apache2 restart
Брандмауэры разрешают http и https
Как мне это очистить? Я подозреваю, что проблема связана с Apache2 и виртуальными хостами
You need to create and enable 2 separate Apache's virtual hosts as it is explained here.
The server name directives must look like:
ServerName wiki.local
ServerName cloud.local
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:
127.0.0.1 localhost wiki.local cloud.local
If the client is another computer in the LAN:
192.168.0.100 wiki.local cloud.local
Where 192.168.0.100
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