簡體   English   中英

如何在共享/經銷商托管(hostgator)上正確安裝Laravel 5.2?

[英]How to install correctly Laravel 5.2 on a shared / reseller hosting (hostgator)?

我在Hostgator的經銷商托管帳戶上通過ssh與作曲家進行了全新的Laravel 5.2.43安裝。 Laravel像這樣安裝在root中:

 /home/user/laravel

我想執行以下操作:從Laravel內部結構移動公用文件夾,這是url:

/home/user/laravel/public 

到public_html中的另一個文件夾,這將是url:

/home/user/public_html/laravel-public-folder-here

我怎么能用正確的方法做到這一點?

要進行重定向,我想使用此論壇帖子的最后幾步:

http://laravel.io/forum/02-13-2014-how-to-install-laravel-on-a-hostgator-shared-server

但似乎Laravel 5.2沒有“laravel / bootstrap / paths.php”文件。 論壇帖子可能是舊版本的Laravel。

如果你知道我怎么能以正確的方式做到這一點,請回答。 我已經在堆棧上查看了類似問題的答案,但它們沒有解決我的問題,可能只是我目前想念的Laravel配置問題。

謝謝!

您只需復制laravel項目的所有文件並放入文件夾/ public_html ,下一步是使用以下代碼在/ public_html中創建.htaccess文件:

## Redirect to public folder
    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteRule ^$ public/ [L]
        RewriteRule (.*) public/$1 [L]
    </IfModule>

這項工作適合我在godaddy。

問候!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM