AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-100234

MB34's questions

Martin Hope
MB34
Asked: 2018-10-19 06:03:32 +0800 CST

阻止我们系统的“戳”

  • 0

我们每天都会在 apache 错误日志中获得大量此类信息。

[Wed Oct 17 03:27:37 2018] [error] [client 103.41.124.159] File does not exist: /var/www/html/phpmyadmin
[Wed Oct 17 03:27:37 2018] [error] [client 103.41.124.159] File does not exist: /var/www/html/phpMyAdmin
[Wed Oct 17 03:27:37 2018] [error] [client 103.41.124.159] File does not exist: /var/www/html/pmd
[Wed Oct 17 03:27:37 2018] [error] [client 103.41.124.159] File does not exist: /var/www/html/pma
[Wed Oct 17 03:27:37 2018] [error] [client 103.41.124.159] File does not exist: /var/www/html/PMA
[Wed Oct 17 03:27:38 2018] [error] [client 103.41.124.159] File does not exist: /var/www/html/PMA2
[Wed Oct 17 03:27:38 2018] [error] [client 103.41.124.159] File does not exist: /var/www/html/pmamy
[Wed Oct 17 03:27:38 2018] [error] [client 103.41.124.159] File does not exist: /var/www/html/pmamy2
[Wed Oct 17 03:27:38 2018] [error] [client 103.41.124.159] File does not exist: /var/www/html/mysql
[Wed Oct 17 03:27:38 2018] [error] [client 103.41.124.159] File does not exist: /var/www/html/admin

有没有办法:

  1. 阻止这些被记录?
  2. 阻止执行此操作的 IP 地址?建立他们的名单来阻止?

这个特定的 IP 有 54 个不同的“戳”。它们来自不同的 IP 地址,所以我不知道该怎么做。

apache-2.2
  • 1 个回答
  • 70 Views
Martin Hope
MB34
Asked: 2018-06-02 12:13:37 +0800 CST

.htaccess 中的允许目录

  • 1

我在我的文件夹 API 中安装了这个 .htaccess 文件。它用于将所有请求重定向到 api.php 脚本。

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^(.*)$ api.php?rquest=$1 [QSA,NC,L]

    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.*)$ api.php [QSA,NC,L]

    RewriteCond %{REQUEST_FILENAME} -s
    RewriteRule ^(.*)$ api.php [QSA,NC,L]   
</IfModule>  

现在,我为我的 API 添加了一些 Swagger 文档,并且需要能够使用以下 URL 访问它localhost/API/Swagger/ui:当我尝试访问该 URL 时,我不断收到 404。

目前使用 WAMP 进行设置,但在我测试完所有内容后将立即部署到生产服务器。我可以很好地访问这样的 API 函数:localhost/API/GetMakes?year=2010

关于做什么的任何想法?

.htaccess
  • 1 个回答
  • 925 Views
Martin Hope
MB34
Asked: 2016-09-17 09:09:16 +0800 CST

IIS7 和 SSL 证书

  • 1

我有几个 IIS 服务器和几个 Apache 服务器。当我创建 CSR 并获得我的“星”证书时,我在我的 Apache 服务器上构建了 CSR。我从 Digicert 获得了证书,并获得了一个包含 .CRT 文件的文件。

我可以在我的 IIS 服务器上使用它们吗?

还是我必须为每个服务器创建一个 CSR,然后为每个服务器获取一个新证书?

iis-7 ssl-certificate
  • 2 个回答
  • 72 Views
Martin Hope
MB34
Asked: 2016-07-14 12:44:24 +0800 CST

IIS6.1 上的 PHP 错误日志文件和写入权限

  • 0

这是在 IIS 6.1 上运行的带有 PHP 5.3.6 的 Windows 2008 R2 标准服务器(内部版本 7601:Service Pack 1)

我的 PHP.ini 文件中有这些设置:

error_reporting = E_ALL & ~E_DEPRECATED
log_errors = On
log_errors_max_len = 1024
error_log = C:/inetpub/temp/php_errors.log

也试过这些:

error_log = C:\inetpub\temp\php_errors.log
error_log = C:\inetpub\wwwroot\php_errors.log
error_log = C:\windows\temp\php_errors.log

phpinfo()报告上面显示的正确值。

但我仍然无法从 PHP 脚本获取任何代码写入日志文件。我试过这个:

error_log("Database not available!", 0);

甚至这个:

asd();

这可能是权限问题,因为我也无法使用 fwrite 编写任何内容:

$fp = fopen('MyErrors.txt', 'a'); // this should go into the same directory
                                  // as my script but it, too, is not writing
fwrite($fp, "Error Msg ". $emsg . "\n");
fclose($fp);            

我将权限设置到我正在编写错误日志的文件夹以及我尝试使用以下信息编写文件的位置:http: //blog.chrismeller.com/enabling-php-write-access-on-iis

但是我仍然无法在系统上的任何地方随时写入 php-errors.log 或 MyErrors.txt。

有任何想法吗?

php iis-6 file-permissions
  • 1 个回答
  • 286 Views
Martin Hope
MB34
Asked: 2014-05-07 07:42:15 +0800 CST

为什么我的 robots.txt 不起作用?

  • 1

我有这个 robots.txt:

User-Agent: *
Disallow: /files/

User-Agent: ia_archiver
Allow: /

User-agent: Googlebot 
Disallow: 

User-agent: googlebot-image 
Disallow: 

User-agent: googlebot-mobile 
Disallow: 

我发现 /files/ 目录中的 PDF 文件正在被 Google 索引。

我应该将第一个条目移到底部吗?

在使用 Google 的网站管理员工具时。我将 /files/ disallow 移到了底部,并对 files 目录中的一个 PDF 文件进行了测试,它返回了 Success。

我该如何解决这个问题?我们不希望此目录中的任何内容被索引。

已编辑

即使我删除了除第一个子句之外的所有内容,

User-Agent: *
Disallow: /files/

Google 仍然可以在 /files/ 目录中看到 PDF,我在这里做错了什么?

在 Bing 的网站管理员工具中,它显示为被阻止,但 Google 仍然显示成功。

robots.txt
  • 1 个回答
  • 4612 Views
Martin Hope
MB34
Asked: 2013-07-26 07:38:02 +0800 CST

PHP default_charset 不变

  • 0

我已经修改了 phpinfo() 的 Loaded Configuration File 值中显示的 php.ini 文件,以将 default_charset 设置为 UTF-8:

default_charset = "UTF-8"

在此处输入图像描述

但是,当我重新运行 phpinfo() 时,我看不到任何变化。我还需要做什么来确保这个东西得到设置?

php.ini
  • 1 个回答
  • 3610 Views
Martin Hope
MB34
Asked: 2012-08-31 08:33:04 +0800 CST

.htaccess 强制 https

  • 0

我有这个重写规则:

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/(register|login)
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{SERVER_NAME}/$1 [L,R]

我还有其他几个需要像这样强制使用 HTTPS:

http://www.mysite.com/inc/dues_login/ABC
http://www.mysite.com/inc/dues_login/DEF
http://www.mysite.com/inc/dues_login/GHI

我怎样才能让这些也强制使用 https?

.htaccess
  • 2 个回答
  • 66 Views
Martin Hope
MB34
Asked: 2012-06-15 07:24:22 +0800 CST

查找linux软链接

  • 1

我们有一个 ExpressionEngine 安装。CSS 模板存储在名为 /na_cms/expressionengine/templates/default_site/c.group 的目录中

当EE把这些解析出来后,路径就变成了/css/c

EE不改变路径,我估计它是一个符号链接。我怎样才能找到设置的位置?

此外,Javascript 文件位于 j.group 目录中,但链接解析为 /j

它没有在 .htaccess 中完成。

symbolic-link
  • 1 个回答
  • 71 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve