I've created a backend theme from Mage/backend. When I deploy the static content, the theme is deployed but in front, the CSS is not shown. I created a styles.css file in the CSS folder of the theme.
Maybe I need to declare somewhere the styles.css but where?
St3phan
2,9451 gold badge26 silver badges49 bronze badges
-
try to add in pub and load the page is it woring?Jaimin– Jaimin2017年11月08日 12:43:37 +00:00Commented Nov 8, 2017 at 12:43
-
Where you create a new theme? In which folder?St3phan– St3phan2017年11月08日 12:44:38 +00:00Commented Nov 8, 2017 at 12:44
-
We need more information.St3phan– St3phan2017年11月08日 12:46:49 +00:00Commented Nov 8, 2017 at 12:46
-
You can declare that css file in Magento_Theme->Layout->default.xml file and put css file in Magento_Theme->Css folderKushal Dani– Kushal Dani2017年11月08日 13:00:49 +00:00Commented Nov 8, 2017 at 13:00
1 Answer 1
After installing Magento 2
sudo service apache2 restart
sudo chmod -R 777 var/
sudo chmod -R 777 pub/
sudo service apache2 restart
sudo chmod -R 777 /var/www/html/magento
sudo a2enmod rewrite
sudo service apache2 restart
Content deploy
php bin/magento setup:static-content:deploy "on root dir".
if it's not working yet
For Ubuntu edit the file /etc/apache2/apache2.conf
find
/var/www/
Change AllowOverride None to AllowOverride All under the following section:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
PY Yick
2,7051 gold badge19 silver badges35 bronze badges
-
Thanks it works well. It was a file permissions problem :/Kpone– Kpone2017年11月09日 09:23:44 +00:00Commented Nov 9, 2017 at 9:23
default