几个小时以来,我一直在努力完成这项工作。我正在尝试在我的 VPS 上使用 Apache 设置虚拟主机。
我的站点可用文件夹中有以下虚拟主机文件:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/domain.ie
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/domain.ie>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride …Run Code Online (Sandbox Code Playgroud) 我更改了 SSH 默认端口(通过更新 /etc/ssh/sshd_config 文件中的 Port 属性)。但是我想做的仍然是让它看起来好像一切都按预期工作,如果有人试图通过端口 22 连接到 SSH。
目前,在更改 SSH 端口并尝试通过端口 22 登录后,SSH 返回:
ssh:连接到主机 server_ip 端口 22:连接被拒绝
有没有办法返回正常输出“输入密码”,但将 SSH 配置为从不接受来自端口 22 的登录?
我的想法是,如果有人要尝试对我的服务器进行暴力破解,他们将尝试的第一个端口是 22。永远无法访问。
尝试在线搜索此内容,但它会带回不需要的结果。
谢谢!