问一下大佬们,服务器有的网站能用某个端口打开,有的则不能,谢谢

ddyy1s 2020-05-20 02:59:55
各位大佬好,我有一台服务器,使用phpsduty+Apache+php,里面放了几个网站,默认只开通了80和443端口,但有的域名能从8081-8091之间的任一端口都能打开,比如www.abc.com:8081 www.abc.com:8082 www.abc.com:8083。。。。这样一直到8091之间的任一端口都能打开,奇怪的是部分域名这样能打开,部分域名这样打不开,如何禁止这种操作呢,就是说只能使用80和443端口打开,其余的设置成禁止打开。谢谢

配置如下:

<VirtualHost *:80>
DocumentRoot "F:/wwwroot/abc"
ServerName www.abc.com
ServerAlias
FcgidInitialEnv PHPRC "B:/phpstudy_pro/Extensions/php5.2/php5.2.17nts"
AddHandler fcgid-script .php
FcgidWrapper "B:/phpstudy_pro/Extensions/php5.2/php5.2.17nts/php-cgi.exe" .php
CustomLog "B:/phpstudy_pro/Extensions/Apache2.4.39/logs/www.abc.com_acess_%y%m%d.log" common
ExpiresActive On
<Directory "F:/wwwroot/abc">
Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
DirectoryIndex index.html index.php
ExpiresByType image/gif A14400
ExpiresByType image/jpeg A14400
ExpiresByType image/jpg A14400
ExpiresByType image/png A14400
ExpiresByType application/x-shockwave-flash A2592000
ExpiresByType text/css A14400
ExpiresByType application/javascript A14400
</Directory>
<IfModule deflate_module>
SetOutputFilter DEFLATE
DeflateCompressionLevel 6
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
AddOutputFilter DEFLATE css|js|txt|xml|rss|html|htm
Header append Vary User-Agent env=!dont-vary
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png|bmp|tif|ico|eot|svg|ttf|woff)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|7z|bz2|sit|rar|bin|iso)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .(?:pdf|doc|docx|xls|xlsx|ppt|pptx)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .(?:mov|flv|avi|mp3|mp4|rm|webm|ogv)$ no-gzip dont-vary
</IfModule>
ErrorDocument 400 /error/400.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 500 /error/500.html
ErrorDocument 501 /error/501.html
ErrorDocument 502 /error/502.html
ErrorDocument 503 /error/503.html
ErrorDocument 504 /error/504.html
ErrorDocument 505 /error/505.html
ErrorDocument 506 /error/506.html
ErrorDocument 507 /error/507.html
ErrorDocument 510 /error/510.html
</VirtualHost>
...全文
194 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ddyy1s 2020-05-20
  • 打赏
  • 举报
回复
引用 1 楼 weixin_43869905 的回复:
防火墙 打开 只开你需要开的端口 就好了 其他一律关掉
8081~8091这些端口防火墙没有开呢,我就奇怪为什么这样访问也能打开
weixin_43869905 2020-05-20
  • 打赏
  • 举报
回复
防火墙 打开 只开你需要开的端口 就好了 其他一律关掉

24,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧