2015-10-19 121 views
1

清除緩存, 給予777權限在maganto目錄, 還是無解的所有文件和文件夾..CSS可在我的VPS不加載了Magento的2

我甚至無法訪問管理面板,因爲鏈接不正常工作。

這是一個新安裝的,我做了

git clone magento_https_link 

其中的鏈接是GitHub的鏈接magento2 @ github上。

一切都很順利,我跟着官方教程,安裝了作曲家的東西和所有的東西,我安裝了它,接下來的步驟結束,當安裝完成時,我點擊前端,沒有css,後端,沒有css 。 Css在安裝過程中工作正常。

當我按下F12並切換到控制檯時,它會在css,javascript和圖像文件上顯示錯誤404。如果我嘗試爲任何CSS手動訪問網址,他們不在那裏。它真的很奇怪。

我不知道什麼是CSS JS合併。不知道這件事。

我的核心配置數據庫:

mysql> select * from `core_config_data`; 
+-----------+---------+----------+-------------------------------+------------------------------------------+ 
| config_id | scope | scope_id | path       | value         | 
+-----------+---------+----------+-------------------------------+------------------------------------------+ 
|   1 | default |  0 | web/seo/use_rewrites   | 1          | 
|   2 | default |  0 | web/unsecure/base_url   | http://NAME_OF_SITE/magento/magento2/ | 
|   3 | default |  0 | web/secure/base_url   | https://NAME_OF_SITE/magento/magento2/ | 
|   4 | default |  0 | general/locale/code   | en_US         | 
|   5 | default |  0 | web/secure/use_in_frontend | NULL          | 
|   6 | default |  0 | web/secure/use_in_adminhtml | NULL          | 
|   7 | default |  0 | general/locale/timezone  | XX/XX        | 
|   8 | default |  0 | currency/options/base   | XX          | 
|   9 | default |  0 | currency/options/default  | XX          | 
|  10 | default |  0 | currency/options/allow  | XX          | 
|  11 | default |  0 | general/region/display_all | 1          | 
|  12 | default |  0 | general/region/state_required | AT,BR,CA,CH,DE,EE,ES,FI,FR,LT,LV,RO,US | 
|  13 | default |  0 | catalog/category/root_id  | NULL          | 
+-----------+---------+----------+-------------------------------+------------------------------------------+ 
13 rows in set (0.00 sec) 
+0

你好,請問目前的index.php運行,你可以把一個模具()函數來交叉檢查? – Chiragit007

+0

是的,它運行。 反正我使用的是git克隆的東西,而不是我從magento的官方網站下載並上傳,它工作完美,git版本有問題.. – user1735921

回答

3

你執行使用bin/Magento的安裝所有必要的步驟?

這聽起來像你應該嘗試做(在你的根Magento的類別):

bin/magento setup:static-content:deploy 

請讓我知道,如果這有助於。

0

只需打開MAGENTO_ROOT/app/etc/di.xml和行號574

<item name="view_preprocessed" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink</item> 

替換下面的代碼
<item name="view_preprocessed" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Copy</item> 
1

Magento2有這個初始問題,但請按照下面的步驟獲取其工作!

步驟1:執行命令CMD
步驟2:使用

CD瓦帕/網絡/ [Magento的DIR轉到Magento的安裝目錄。]

步驟3:運行

PHP倉/ magento的設置:靜態含量:部署


4步:運行

PHP倉/ Magento的索引器:reindex


第5步:從

VAR /緩存刪除緩存/


它變得工作,爲前端&後端[刪除所有目錄。]!

http://developerforums.blogspot.com/