if ($http_user_agent ~* (YandexBot)) { return 403; } |
if (!empty($_SERVER['HTTP_USER_AGENT'])) { $options = array( 'YandexBot', 'YandexAccessibilityBot', 'YandexMobileBot','YandexDirectDyn', 'YandexScreenshotBot', 'YandexImages', 'YandexVideo', 'YandexVideoParser', 'YandexMedia', 'YandexBlogs', 'YandexFavicons', 'YandexWebmaster', 'YandexPagechecker', 'YandexImageResizer','YandexAdNet', 'YandexDirect', 'YaDirectFetcher', 'YandexCalendar', 'YandexSitelinks', 'YandexMetrika', 'YandexNews', 'YandexNewslinks', 'YandexCatalog', 'YandexAntivirus', 'YandexMarket', 'YandexVertis', 'YandexForDomain', 'YandexSpravBot', 'YandexSearchShop', 'YandexMedianaBot', 'YandexOntoDB', 'YandexOntoDBAPI', 'Googlebot', 'Googlebot-Image', 'Mediapartners-Google', 'AdsBot-Google', 'Mail.RU_Bot', 'bingbot', 'Accoona', 'ia_archiver', 'Ask Jeeves', 'OmniExplorer_Bot', 'W3C_Validator', 'WebAlta', 'YahooFeedSeeker', 'Yahoo!', 'Ezooms', '', 'Tourlentabot', 'MJ12bot', 'AhrefsBot', 'SearchBot', 'SiteStatus', 'Nigma.ru', 'Baiduspider', 'Statsbot', 'SISTRIX', 'AcoonBot', 'findlinks', 'proximic', 'OpenindexSpider','statdom.ru', 'Exabot', 'Spider', 'SeznamBot', 'oBot', 'C-T bot', 'Updownerbot', 'Snoopy', 'heritrix', 'Yeti', 'DomainVader', 'DCPbot', 'PaperLiBot' ); foreach($options as $row) { if (stripos($_SERVER['HTTP_USER_AGENT'], $row) !== false) { $load = sys_getloadavg(); if ($load[0] > 2) { header('HTTP/1.1 429 Too many requests'); die('Server too busy. Please try again later.'); } if ($load[0] > 0.80) { http_response_code(429); } } } } |
|
/opt/webdir/bin/bx-sites -a create -s site.local-dev.ru -t kernel --charset UTF-8 --cron |
# get command line options Getopt::Long::Configure("bundling"); my $result_option = GetOptions( 'v' => \$o_verbose, 'verbose' => \$o_verbose, 'h' => \$o_help, 'help' => \$o_help, "a:s" => \$o_action, 'action:s' => \$o_action, "s:s" => \$o_site, 'site:s' => \$o_site, 'hiden' => \$o_hiden, "o:s" => \$o_format, 'output:s' => \$o_format, 'd:s' => \$o_dbname, 'database:s' => \$o_dbname, 'u:s' => \$o_user, 'user:s' => \$o_user, 'p:s' => \$o_pass, 'password:s' => \$o_pass, 't:s' => \$o_type, 'type:s' => \$o_type, 'r:s' => \$o_root, 'root:s' => \$o_root, 'H:s' => \$o_hostname, 'hostname:s' => \$o_hostname, 'smtphost:s' => \$o_SMTPHost, 'smtpport:s' => \$o_SMTPPort, 'smtpuser:s' => \$o_SMTPUser, 'password:s' => \$o_SMTPPassword, 'smtptls' => \$o_SMTPTLS, 'smtpauth:s' => \$o_SMTPAuth, 'email:s' => \$o_EmailAddress, 'disable' => \$o_disable, 'enable' => \$o_enable, 'minute:s' => \$o_min, 'hour:s' => \$o_hour, 'day:s' => \$o_day, 'month:s' => \$o_month, 'weekday:s' => \$o_wday, 'ntlm_domain:s' => \$o_ntlm_domain, 'ntlm_fqdn:s' => \$o_ntlm_full_domain, 'ntlm_ads:s' => \$o_ntlm_ads, 'ntlm_login:s' => \$o_ntlm_login, 'ntlm_password:s' => \$o_ntlm_password, 'ntlm_host:s' => \$o_ntlm_host, 'filters:s' => \$o_filters, 'service:s' => \$o_service, 'kernel_site:s' => \$o_kernel_site, 'kernel_root:s' => \$o_kernel_root, 'charset:s' => \$o_charset, 'cron' => \$o_enable_cron, 'password_file:s' => \$o_password_file, 'tmpdir:s' => \$o_tmpdir, 'fstype:s' => \$o_fstype, 'extension:s' => \$o_extension, 'dns:s' => \$o_dns, 'private_key:s' => \$o_private_key, 'certificate:s' => \$o_certificate, 'certificate_chain:s' => \$o_certificate_chain, 'nodejspush' => \$o_push, 'domains:s' => \$o_domains, ) or unknown_arg(); |
/opt/webdir/bin/bx-sites -a create -s site.local-dev.ru -t kernel --charset UTF-8 --cron --nodejspush |
/opt/webdir/bin/bx-sites -a delete -s site.local-dev.ru -t kernel -r /home/bitrix/ext_www/site.local-dev.ru |
/opt/webdir/bin/bx-process -a list |
Обратитесь в « |
Обратитесь в « |