我想把我当地的Laravel项目上传到godaddy上,但是我有一些错误
错误
[Wed Jul 05 21:16:44.858396 2017]
[autoindex:error] [pid 21796:tid 139689709188864]
[client 99.240.235.234:57754]
AH01276:
Cannot serve directory /home/bugsbunny/public_html/sto.com/:
No matching DirectoryIndex (/home/bugsbunny/public_html/sto.com/public/index.php)
found, and server-generated directory index forbidden by Options directive
.htaccess
DirectoryIndex /home/bugsbunny/public_html/sto.com/public/index.php
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ /home/bugsbunny/public_html/sto.com/public/index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
我所做的步骤
RewriteRule
开始的行发布于 2017-07-06 12:02:50
在Godaddy上,我发现用这个过程创建/上传Laravel应用程序更容易
1- Create an addon domain or a sub-domain on Godaddy
2- Install a Laravel app (Quick-install) on this domain/sub-domain
3- Download this app on local (my computer) with Filezilla (or other sftp software)
4- On local disk change the .env database access or (create a user+password+database on phpmyadmin/mysql with the information contain in the .env that Godaddy setup for you)
5- finish up the app (Build the webapp project that you want to do).
6- Upload the app to the server (except the .env) with Filezilla
7- upload the database (mysql) from local to Godaddy
因此,不需要更改.htaccess文件。
发布于 2017-07-05 21:56:30
为什么你不使用专用主机的拉拉。得到你的服务器和数字信号,等等,做你想做的事.
https://stackoverflow.com/questions/44939796
复制相似问题