我想在共享主机(ovh)上部署 laravel 项目
我有 ftp 访问权限,共享主机的文件夹架构如下:
我已将 laravel 的文件上传到根文件夹,并将公共文件夹的内容上传到www
:
这也是我的www/.htaccess
文件:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
这是我的.env
文件:
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:kUQEHrtug5E+ZOI99vKg+BKkfU6rdzH9pUXhmbDYzsg=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=XXXXXXX.XXXXX.XXXX
DB_PORT=3306
DB_DATABASE=XXXXXXX
DB_USERNAME=XXXXXX
DB_PASSWORD=XXXXXXX
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=ssl0.ovh.net
MAIL_PORT=465
[email protected]
MAIL_PASSWORD=XXXXXXXX
MAIL_ENCRYPTION=ssl
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
所有这些上传完成后,我收到以下错误:
This page isn't working. XXXXX is currently unable to handle this request. HTTP_ERROR 500
我已将文件夹的权限设置storage/logs
为 775
有人知道发生了什么事吗?