Real time flushing in PHP on Nginx

Works perfectly on RunCloud’s Native Nginx Stack. @ini_set(‘zlib.output_compression’, 0); @ini_set(‘output_buffering’, ‘Off’); @ini_set(‘implicit_flush’, true); @ob_implicit_flush(1); @ob_end_clean(); header(‘Content-Encoding: none’); header(‘X-Accel-Buffering: no’);

Use Rocket-Nginx under RunCloud

Login as root then enter following commands. cd /etc/nginx-rc git clone https://github.com/satellitewp/rocket-nginx.git cd rocket-nginx cp rocket-nginx.ini.disabled rocket-nginx.ini php rocket-parser.php As of version 2.1.1 there is a typo in the rocket-nginx.ini , change media_header to medias_header My template: https://gist.github.com/Dibbyo456/2b08a4ff74665ccc40e0985b8f22292a Create file {app-name}.location.main-before.rocket.conf

Add headers to certain directories in Nginx under RunCloud

Sometimes we wants to add custom http headers to certain directories and their files. For example: I wanted to add X-Robots-Tag header to some some private directories so it does not get indexed. I’ve tried many methods in the internet

Useful Nginx Hacks

The Regular Expression translates to: “rewrite all URLs without any ‘.’ (dot) in them that don’t end with a ‘/’ to the URI + ‘/’” Or simply: “If the URI doesn’t have a period and does not end with a

Useful RunCloud Hacks

In this page I shared all the RunCloud hacks that I have been using. 1) WordPress under subdirectory in Nginx If you want to install WordPress under subdirectory in RunCloud Native Nginx stack, then this will help you configure it.