Applicable to:
- Plesk for Linux
Symptoms
-
The
/icons
folder is presented under domain home directory and the file, e.g.test.png
, exists in the/icons
folder. -
The page
http://example.com/icons/test.png
shows the following error appears:CONFIG_TEXT: Server Error
404
Page Not Found
Cause
All requests containing /icons
are redirected to the /usr/share/httpd/icons/
(or to /usr/share/apache2/icons/
) folder.
This redirect is defined by default in Apache configuration file.
Resolution
Disable the Apache redirect:
-
for CentOS-based systems:
-
Connect to the server via SSH.
-
Make a backup of the
/etc/httpd/conf.d/autoindex.conf
file:# cp /etc/httpd/conf.d/autoindex.conf /etc/httpd/conf.d/autoindex.conf.back
-
Comment the row below in the
/etc/httpd/conf.d/autoindex.conf
file:# cat /etc/httpd/conf.d/autoindex.conf | grep "Alias /icons/"
[BEFORE]
Alias /icons/ "/usr/share/httpd/icons/"
[AFTER]
#Alias /icons/ "/usr/share/httpd/icons/" -
Reload Apache service:
# service httpd reload
-
-
for Debian-based systems:
-
Connect to the server via SSH.
-
Make a backup of the
/etc/apache2/mods-available/alias.conf
file:# cp /etc/apache2/mods-available/alias.conf /etc/apache2/mods-available/alias.conf.back
-
Comment the row below in the
/etc/apache2/mods-available/alias.conf
file:# cat /etc/apache2/mods-available/alias.conf | grep "Alias /icons/"
[BEFORE]
Alias /icons/ "/usr/share/apache2/icons/"
[AFTER]
#Alias /icons/ "/usr/share/apache2/icons/" -
Reload Apache service:
# service apache2 reload
-
Comments
0 comments
Please sign in to leave a comment.