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-117379

Jürgen Paul's questions

Martin Hope
Jürgen Paul
Asked: 2013-10-27 02:00:17 +0800 CST

当我让 sshd 监听另一个端口时,如何伪造端口 22?

  • 9

我不想让可能的黑客通过端口扫描我的服务器,我只想假装 sshd 正在侦听端口 22 并记录尝试。这样做有意义吗?如果是,有哪些积极开发的工具/库可用。

security
  • 4 个回答
  • 2097 Views
Martin Hope
Jürgen Paul
Asked: 2012-09-29 22:31:41 +0800 CST

如何撤消我所做的 iptables 规则?

  • 7

我不小心做了:

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to 0.0.0.0

什么时候0.0.0.0应该是服务器的 IP 地址,但我忘了替换它。我怎样才能撤销这个?

ubuntu
  • 1 个回答
  • 3483 Views
Martin Hope
Jürgen Paul
Asked: 2012-09-07 20:53:58 +0800 CST

limit_req 导致 503 Service Unavailable

  • 2

503 Service Unavailable当我limit_req打开时,我经常得到。在我的日志中:

[错误] 22963#0:*70136 限制请求,超出:1.000 按区域“闪电战”,客户端:64.xxx.xxx.xx,服务器:dat.com,请求:“GET /id/85 HTTP/1.1”,主持人:“dat.com”

我的 nginx 配置:

limit_req_zone $binary_remote_addr zone=blitz:60m rate=5r/s;
limit_req   zone=blitz;

我该如何解决这个问题。60m 还不够大吗?我所有的静态文件都托管在 amazon s3 上。

nginx
  • 1 个回答
  • 11726 Views
Martin Hope
Jürgen Paul
Asked: 2012-08-12 18:24:47 +0800 CST

Nginx 重写多个位置

  • 0

我想https在这里重写特定位置:

server {
    listen       80;
    server_name  mysite.com www.mysite.com;
    root   /var/www/$server_name/public;
    #error_log /error.logg debug;
    error_page 403 /403.html;
    location  = /403.html {
        allow all;
    }
    location / {
        #allow xxx.xxx.xxx;
        #deny all;
        index  index.html index.htm index.php;
        try_files $uri $uri/ /index.php?$args;
    }
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
    location /register {
        rewrite ^ https://$http_host$request_uri?$args permanent;
    }
    location /login {
        rewrite ^ https://$http_host$request_uri?$args permanent;
    }
}

/register并且/login不是我需要写的唯一地方,那么我将如何处理多个位置而不必为每个我想重写为 https 的地方重复位置块?

nginx
  • 1 个回答
  • 2429 Views
Martin Hope
Jürgen Paul
Asked: 2012-07-31 06:25:28 +0800 CST

基于子域的映射请求

  • 1

如何映射我不必重​​写 URI 的子域?

server {
    listen       80;
    server_name  cooking.com user.cooking.com admin.cooking.com;
    root   html/cooking/public;

    location / {
        index  index.html index.htm index.php;
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_param  FEED_ENV  default;
        include        fastcgi_params;
    }
    location ~* \.(ico|css|js|gif|jpe?g|png)$ {
        expires max;
        add_header Pragma public;
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
    }
}

所以基本上当用户访问admin.cooking.com时,它应该请求/index.php/admin/. 我正在考虑使用if,但如果不好。

nginx
  • 1 个回答
  • 277 Views
Martin Hope
Jürgen Paul
Asked: 2012-06-26 22:09:21 +0800 CST

apc.stat 导致 500 内部服务器错误

  • 0

当我关闭apc.stat它时,它会导致 500 内部服务器错误。我检查了 apache error_log,它是关于:

[Tue Jun 26 10:02:59 2012] [error] [client 127.0.0.1] PHP Warning:  require(): Filename cannot be empty in /var/www/site1/public/index.php on line 17
[Tue Jun 26 10:02:59 2012] [error] [client 127.0.0.1] PHP Fatal error:  require(): Failed opening required '' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/site1/public/index.php on line 17

我检查了那一行,这是它包含的内容:

require('./wp-blog-header.php');

我看不出有什么问题。这是我当前的 APC 配置:

APC 版本:3.1.10 PHP 版本:5.4.4

禁用时如何解决此错误apc.stat?

php apache-2.2 alternative-php-cache
  • 1 个回答
  • 689 Views
Martin Hope
Jürgen Paul
Asked: 2012-06-24 23:38:41 +0800 CST

上传大于 1MB 的文件 = 连接重置

  • 8

我在前端使用 nginx 作为“代理缓存”,在后端使用 apache,我将我的 PHP 设置如下:

error_log = /var/www/site1/php_error.log
error_reporting = 22527
file_uploads = On
log_errors = On
max_execution_time = 0
max_file_uploads = 20
max_input_time = -1
memory_limit = 512M
post_max_size = 0
upload_max_filesize = 1000M

有什么问题?上传小于 1MB 的文件是成功的,但任何大于 1MB 的文件,Google Chrome 输出:

Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.

我已经检查了错误日志文件,但它不存在于目录中。我也检查了/var/log/httpd/error_log但没有上传相关问题。我不知道其他可能导致问题的原因,所以我已经向您伸出了援助之手。谢谢!

php apache-2.2 nginx
  • 2 个回答
  • 13219 Views
Martin Hope
Jürgen Paul
Asked: 2012-06-24 11:09:24 +0800 CST

自定义用户 php.ini

  • 1

在每个虚拟主机上,我都有一个自定义的 php.ini:

PHPINIDir /var/www/site1/php.ini

我目前所做的是复制原件然后/etc/php.ini进行/var/www/site1/php.ini修改。但这很让人头疼,我怎样才能只输入我想更改的值,这样/var/www/site1/php.ini例如的内容就会覆盖默认的 php.ini?

memory_limit = 256M
php apache-2.2
  • 1 个回答
  • 98 Views
Martin Hope
Jürgen Paul
Asked: 2012-06-15 01:46:07 +0800 CST

crontab 计划和 cron 作业

  • 2

我在/etc/cron.d/目录中放了两个文件:

第一个在每天中午 12:00 发布新帖子:

0 0 * * * php /var/www/site1/helper post:make

第二个每10分钟更新一次最新的帖子

10 * * * * php /var/www/site1/helper post:update

crontab job1我是否必须根据时间(例如,每 10 分钟)运行此作业,或者我必须做其他事情crontab job2吗?

编辑:我还安装了 cronie。

linux centos scheduled-task cron
  • 4 个回答
  • 377 Views
Martin Hope
Jürgen Paul
Asked: 2012-06-02 20:57:02 +0800 CST

确定哪些应用程序在启动时运行

  • 2

我有一个 CentOS 6 32 位 VPS,我想确定,我如何知道哪些应用程序在启动时自动运行?

编辑:我试过chkconfig --list了,但我不明白这些行是什么意思:

[root@server2 ~]# chkconfig --list
dropbox         0:off   1:off   2:on    3:on    4:on    5:on    6:off
httpd           0:off   1:off   2:off   3:on    4:off   5:off   6:off
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off
modules_dep     0:off   1:off   2:on    3:on    4:on    5:on    6:off
mysqld          0:off   1:off   2:on    3:on    4:off   5:on    6:off
named           0:off   1:off   2:off   3:off   4:off   5:off   6:off
netconsole      0:off   1:off   2:off   3:off   4:off   5:off   6:off
netfs           0:off   1:off   2:off   3:off   4:on    5:on    6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
nginx           0:off   1:off   2:off   3:off   4:off   5:off   6:off
nmb             0:off   1:off   2:off   3:off   4:off   5:off   6:off
nscd            0:off   1:off   2:off   3:off   4:off   5:off   6:off
openvpn         0:off   1:off   2:off   3:on    4:on    5:on    6:off
rdisc           0:off   1:off   2:off   3:off   4:off   5:off   6:off
rpcbind         0:off   1:off   2:on    3:off   4:on    5:on    6:off
rsyslog         0:off   1:off   2:on    3:on    4:on    5:on    6:off
saslauthd       0:off   1:off   2:off   3:on    4:off   5:off   6:off
smb             0:off   1:off   2:off   3:off   4:off   5:off   6:off
snmpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
snmptrapd       0:off   1:off   2:off   3:off   4:off   5:off   6:off
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
udev-post       0:off   1:on    2:on    3:off   4:on    5:on    6:off
xinetd          0:off   1:off   2:off   3:on    4:on    5:on    6:off
linux centos centos6 chkconfig
  • 2 个回答
  • 164 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