$this->in_page() ) || array( 'page' => $this->in_page(), 'subpage' => 'emails_settings' ) */ public function show_system_notices( $page_arr ) { if ( ! in_array( $page_arr, array( 'opsd-files', 'opsd', 'opsd-settings' ) ) ) return false; /////////////////////////////////////////////////////////// $notice_id = 'opsd_system_notice_nginix'; /////////////////////////////////////////////////////////// if ( ( isset( $_SERVER[ 'SERVER_SOFTWARE' ] ) ) && ( stristr( $_SERVER[ 'SERVER_SOFTWARE' ], 'nginx' ) !== false ) && ( ! opsd_section_is_dismissed( $notice_id ) ) //|| true ) { // Rules for NGINX $opsd_upload = opsd_upload(); $upload_path = $opsd_upload->get_protected_dir(); if ( isset( $_SERVER[ 'DOCUMENT_ROOT' ] ) ) $upload_path = str_replace( $_SERVER[ 'DOCUMENT_ROOT' ], '', $upload_path ); // replace document root because nginx uses path from document root $nx_rules = "location " . $upload_path . " {\n deny all; \n return 403;\n}"; // echo '
' . $nx_rules . '' );
//FixIn:1.1.1
printf( __( 'By default the file is named %s and placed in the %s directory. (For the open source NGINX product, the location depends on the package system used to install NGINX and the operating system. It is typically one of %s)', 'secure-downloads' )
, 'nginx.conf'
, '/etc/nginx'
, '/usr/local/nginx/conf, /etc/nginx, /usr/local/etc/nginx.'
);
echo ' ';
printf( __( 'Please contact your server administrator or support of hosting company about more details of your server configuration.', 'secure-downloads' ) );
?>' . $nx_rules . '' );
echo '