• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Resolved LimitRequestLine in Additional directives for HTTP not working

Edward A B

New Pleskian
Hi everyone,

I apologise in advance that I'm a newbie to plesk. I'm previewing a website on my new Plesk Server and I realised that the site displays only images with short files names but gives a 404 Error (from Server Logs) and does not display any of my images with prety long file names. I got some advice to increase the LimiteRequestLine value in Additional HTTP/HTTPS Directives for Apache, which I have done (LimitRequestLine 100000). Yet the server ignores this directive and does not display my images with long file names.

I got another advise to edit the Apache2.conf file but I've checked all the /etc/ directory and it's not there.

Any ideas will help as I'm completely new to Plesk.

Many thanks in advance.
 
In a default setup, static files like images are not served by Apache, but by nginx. Apache is never asked to deliver the file.

However, I have never heard before that a long image file name causes a 404 not found error. I'd rather guess that the file name itself is problematic, e.g. includes spaces or special characters.
 
Thanks Peter. What confuses me is that all the images worked okay on my previous hosting server. If there were any problems in the names as you suggest, why did they work okay then, but wouldn't after I migrated to Plesk? By the way, do you have any ideas how to get round the issues regarding stuff in the names which can cause all the trouble I'm having with my images? I believe there should be a way out cos it all worked okay on my previous shared server.

I appreciate your help.

Edward
 
Could you please give one example of an image file name that does not work? Me or someone else could then simply create a file with that name on a working system to see what happens when it is requested.

By the way, you might not find apache2.conf in /etc, because the name of Apache configuration files depend on the operating system you are using. If you don't have apache2.conf you will likely have httpd.conf instead.
 
Here you go Peter,

Examples of the image file names:

100123n3i5lj687o8tr99tlfcggb9832creative website1.jpg
100126e51ba77c28e444475649901cbf343b21.jpg
100142jb69v9q5bo4sr62n6o32hm9gn7Lexmark-wireless-printer-problems.jpg
100099ppnj148csehqib5u7fgm9ddac1354839E9-F9F3-4C27-8A0E-C7415939BF80.png
100159cprgggbm05cookj63mhcigba05USA 2.jpg
101022aef4qd4gh0s0g8fre2g4mu8ua628661274_2374542069238535_323590767070438415_n.jpg

Thanks.
 
Are these real files or are these just filename that are translated by a rewrite rule to their real filenames? They all look like they are just keys to a database entry that translates to a real file name. Have you checked what your rewrite rules do? Do they translate into the correct path and filename?

100123n3i5lj687o8tr99tlfcggb9832creative website1.jpg
and
100159cprgggbm05cookj63mhcigba05USA 2.jpg
include spaces in their names. This can create additional issues, because some browsers won't be able to interpret the space character correctly. They are not suitable for testing and should be omitted from any tests.

The other file names are not exactly "long". For example 100126e51ba77c28e444475649901cbf343b21.jpg is a short name that must definitely work on all platforms.
 
Hi Peter,

They're all real file names. They're a combination of session ids, random numbers and uploaded image names. I used a php script to do that in order to give each image a unique name as there are thousands of them and they're all in the same image folder. I used to have problems where some images uploaded by users of my website had similar file names. I don't have much control over the file names visitors upload into their accounts on my website.
 
Hi folks,

I finally bumped into a solution for my issue somewhere else. I think some sort of file or file name corruption happened when I manually downloaded my image folder from my previous server onto my computer and then uploaded it to my new server via an FTP client. I tried the move over again using the 'Site Import' app (or Extension) on my Plesk Interface and now all the images are showing irrespective of the weirdness in some of the file names. So in effect, I did the move-over Server to Server. You may want to call it a Migration process but that is yet another app(Extension) on the Plesk Interface which is meant to achieve the same purpose. A really huge sigh of relieve for me!

Many thanks.
 
Back
Top