我的问题有点超出权限。权限只是我必须在这里拼凑的难题的一部分,但最终它奏效了
panel ajenti 的 1º 问题
我特别使用 ajenti 管理面板,因为无法在 ubuntu 上安装 cpanel,事实是 ajenti 在 apache 中导致了一些 clonflits,解决方案是使用以下命令重新安装它:
sudo apt-get remove ajenti
sudo apt-get install python python-support python-lxml python-gevent openssl python-gevent-socketio python-psutil python-reconfigure python-daemon python-passlib python-requests python-dbus apt-show-versions python-catcher python-exconsole python-ldap python-pil
wget http://realrepo.ajenti.org:8888/ng/debian/pool/main/a/ajenti/ajenti_1.2.23.13_all.deb
sudo dpkg --ignore-depends=python-imaging -i ajenti_1.2.23.13_all.deb
apache 的 2º 问题
由于我需要在 ubuntu 上托管多个域,并且在不同国家/地区使用服务器以减慢加载时间,因此我在设置 apache 时遇到了一些问题。文件如下所示:
000-default.config
<Directory "/www">
AllowOverride All
</Directory>
ServerName 00.00.00.00 #ip
ServerAdmin webmaster@mydomain.com
DocumentRoot /www
默认
SSLEngine on
SSLOptions +ExportCertData +StrictRequire
SSLCertificateFile #paste here the certificate path
SSLCertificateKeyFile #paste here the path of the certificate key
<Directory /www>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
像这样启用 mod_rewrite:sudo a2enmod rewrite
修改后在终端运行命令:sudo systemctl restart apache2.service
php & composer 的 3º 问题
我在使用 php 时遇到了问题,因为 apache 没有解释这些文件,这就是解决方案:
sudo apt-get purge php7.3 php7.3-cli libapache2-mod-php7.3 libapache2-mod-php php7.3-mysql phpmyadmin
sudo rm -rf /etc/php7.3
sudo apt-get install php7.2 libapache2-mod-php7.2 libapache2-mod-php php7.2-common php7.2-mysql php7.2-xml php7.2-xmlrpc php7.2-curl php7.2-gd php7.2-imagick php7.2-cli php7.2-dev php7.2-imap php7.2-mbstring php7.2-opcache php7.2-soap php7.2-zip php7.2-intl -y
sudo a2enmod php7.2
sudo systemctl restart apache2.service
在作曲家的情况下,因为我在安装中使用了 sudo,所以我遇到了问题,请按照解决方案:
sudo chown -R $USER. ~
sudo chown username:group /home/username/.composer
4º 权限问题
以下命令通过权限解决了问题
php artisan cache:clear
sudo chmod -R 777 bootstrap/
sudo chmod -R 777 storage/
composer dump-autoload