在WSL2上安装MantisBT



我已经在Ubuntu wsl2中安装了MantisBT,我没有任何问题,像在另一个Ubuntu服务器中一样(除非启用ufw),但是在打开浏览器继续安装的那一刻,我只看到文件index.php的内容。浏览器中的index.php

我试着搜索关于在wsl中安装mantisBT的信息,但没有成功,所以这就是为什么我来这里询问是否有人在Ubuntu中成功地在wsl中安装了mantisBT,或者您有任何线索来尝试解决这个问题。

这是我的apache配置文件,

<VirtualHost *:80>
ServerAdmin webmaster@yourdomain.com
DocumentRoot "/var/www/html/mantis"
ServerName localhost
ServerAlias localhost
ErrorLog "/var/log/apache2/mantis-error_log"
CustomLog "/var/log/apache2/mantis-access_log" combined
<Directory "/var/www/html/mantis/">
DirectoryIndex index.php index.html
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

这是由于缺少php包,所以首先要确保您拥有所需的所有包,我发现这要归功于螳螂-error_log文件,在我的情况下是php-fpm。但是仅仅安装它并不能解决问题,你必须安装它,启动服务并重启apache2

sudo apt install php7.x-fpm
sudo service php7.x-fpm start
sudo service apache2 restart

我可能还忘记了一件事,那就是更改螳螂文件夹的权限

sudo chmod -R 755 /var/www/html/mantis

最后我在配置文件和system32/drivers/host中做了一些更改让它在自己的URL上工作。这只是一种改进,而不是问题的一部分。

<VirtualHost *:80>
ServerAdmin webmaster@yourdomain.com
DocumentRoot "/var/www/html/mantis"
ServerName mantis.test
ServerAlias www.mantis.test
ErrorLog "/var/log/apache2/mantis-error_log"
CustomLog "/var/log/apache2/mantis-access_log" combined
<Directory "/var/www/html/mantis/">
DirectoryIndex index.php index.html
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

system32系统/司机/etc/主机

127.0.0.1 mantis.test
::1 mantis.test

最新更新