arefen
November 23, 2021, 6:24am
1
Hi. I install cyberpanel as a control panel on my server. before I have cpanel with litespeed and everything worked properly.
After transfer my drupal sites to cyberpanel all drupal sites can’t generate image styles. like thumbnail or other
I changed .htaccess from files directory like this
#Options -Indexes -ExecCGI -Includes -MultiViews
Options +SymLinksIfOwnerMatch
Add these lines to settings.php
$settings['file_public_path'] = 'sites/default/files';
$config['image.settings']['suppress_itok_output'] = TRUE;
$config['image.settings']['allow_insecure_derivatives'] = TRUE;
change folder permission to 777 change user and group directory to nobody:nogroup and nothing happened.
anybody can help me?
Nada
November 23, 2021, 9:21am
2
It’s probably just a file permissions issue in your public files directory. The web server must be able to write into all the folders inside that directory. also please mention which litespeed do you use ?
arefen
November 23, 2021, 10:14am
3
I use openlitespeed with cyberpanel
permission is correct I think that related to config for mode_rewrite
I add this line to.htaccess file
ReWriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^/ index.php [L]
<IfModule LiteSpeed>
CacheLookup on
</IfModule>
but after adding my first page is worked but the internal page get 404 error
I have created an issue on the Drupal community .
arefen
November 23, 2021, 10:42am
4
On litespeed error log i get bellow
RewriteFile [/home/domain/public_html/web/sites/default/files/.htaccess] parsed, return 0.
2021-11-23 05:40:16.632521 [INFO] [386139] Invalid rewrite directive: Options +SymLinksIfOwnerMatch
2021-11-23 05:40:16.632562 [INFO] [386139] Invalid rewrite directive: SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
2021-11-23 05:40:16.632570 [INFO] [386139] Invalid rewrite directive: <Files *>
2021-11-23 05:40:16.632575 [INFO] [386139] Invalid rewrite directive: SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003
2021-11-23 05:40:16.632579 [INFO] [386139] Invalid rewrite directive: </Files>
and this
2021-11-23 05:45:38.521305 [INFO] [386142] Invalid rewrite directive: ForceType image/png
2021-11-23 05:45:38.521371 [INFO] [386142] RewriteFile [/home/domain.com/public_html/web/sites/default/files/styles/thumbnail/.htaccess] parsed, return 0.
Nada
November 23, 2021, 11:14am
5
I don’t know if you tried restart LS or not but I still think it’s permission issue,
please try add this line too then restart LS
ForceType text/html Header set Content-Disposition inline
maybe it can solve the issue
follow up them too.
arefen
November 23, 2021, 11:21am
6
Thanks for replying. I must add this line to .htaccess ?
Nada
November 24, 2021, 9:41am
7
not a must, I just suggest as I not have all details also please note this issue is 99% with permissions and not issue with CP