• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Enable php 5.4's Session Upload Progress or use HttpUploadProgressModule in Nginx

JamesSenior

New Pleskian
I need to find a way to either enable the use of php 5.4's Session Upload Progress or use the Http Upload Progress Module in Nginx. I have done a fair bit of reading but have found no clear answer to this. I would prefer to use the session.upload-progress available in php 5.4 but will use the Http Upload Progress Module for Nginx if I really have to. With the latter, how would I add this module and recompile the Nginx that comes with Plesk 11 on my CentOS server? I have heard of using a patch for Nginx to disable proxy_request_buffering or using Tengine. Still no clear instructions. Can anyone help me solve this?
 
Nginx is stopping me. It does something with file uploads that prevents session.upload-progress from being used at all. I can turn Nginx off in Plesk and the upload progress works, turn it back on and it doesn't work. It is a known problem, there is even a module created specifically for Nginx to get around this problem as I have stated in the first post but I would rather use the php method. If I have to use the module then how do I get that installed into the Nginx that comes with Plesk?
 
Last edited:
nginx doesn't support dynamically loaded plugins/modules, so you'll need to recompile it to add any module. Configuration options nginx was built with are shown via:

# nginx -V

The problem is of course that on updates your binary will get overwritten.

Looks like currently there is no way to disable uploads caching by nginx. Therefore it might be an option for you to instead direct upload requests directly to Apache (by default to port 7080 when nginx is enabled).
 
....it might be an option for you to instead direct upload requests directly to Apache (by default to port 7080 when nginx is enabled).
ok that sounds like a great idea if it is only affecting uploads, as I would want to let Nginx handle all file downloading as it does now.... so how do I go about changing the port so that Apache does the uploading side of things? There are a quite few different config files so I have no idea which one to edit
 
A fair warning beforehand: this is not an ideal solution, but it will work. It also forces you to expose Apache to the outer world (but likely you already have it exposed and I bet nothing bad had happened yet).

Technically, you don't need to do anything or alter Apache configuration for that matter. If you have nginx enabled, then Apache would listen on ports 7080 (HTTP) and 7081 (HTTPS), and it will be available externally. You may check this via:

# netstat -tulnap | grep 708
tcp6 0 0 :::7080 :::* LISTEN 30178/apache2
tcp6 0 0 :::7081 :::* LISTEN 30178/apache2


As you can see, on my machine it binds to all interfaces. Normally one would probably firewall these ports from outside connections, leaving only ones coming from the same IPs or localhost (for nginx). You would need to make sure these ports are available from outside. Then you would only need to modify upload form to send to Apache instead of nginx (in other words to port 7080 or 7081).

Please note that I'm not sure it will not cause troubles on browser level with something like cross-domain policy or other stuff. Also some of your site visitors may have certain ports blocked, including the aforementioned ones. Also these ports may indeed be customized in Plesk, but I'm not entirely sure it works properly.
 
Back
Top