内网ip加端口访问问题

问答中心分类: Linux内网ip加端口访问问题
lebuy asked 7 年 ago
监听设置为 Listen 80
Listen 0.0.0.0:32491
Listen [::0]:32491
防火墙设置为
 iptables -A INPUT -p tcp –dport 32491 -j ACCEPT  添加端口
apache的配置文件设置为
<VirtualHost *:32491>
ServerAdmin admin@example.com
DocumentRoot “/data/wwwroot/atp”
ServerName 192.168.2.10
ErrorLog “/data/wwwlogs/atp_error_apache.log”
CustomLog “/data/wwwlogs/atp_apache.log” common
<Directory “/data/wwwroot/atp”>
SetOutputFilter DEFLATE
Options FollowSymLinks ExecCGI
Require all granted
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.html index.php
</Directory>
</VirtualHost>
我想使用 http://192.168.2.10:32491  访问网站,但是没有成功,是为什么呢?那点出错了?如果配置使用ip+端口号的访问方式访问网站!

7 Answers
oneinstack answered 7 年 ago
自己先看下netstat -tpln 端口是否启动,本地telnet  192.168.2.10 32491 

lebuy answered 7 年 ago
使用netstat -tpln  显示1180/sshd
tcp 0 0 :::32491 :::* LISTEN
telnet提示
正在连接192.168.2.10:32491...无法打开到主机的连接。 在端口 23: 连接失败
怎么办?

oneinstack answered 7 年 ago
方便的话私信回复公网IP root密码

lebuy answered 7 年 ago
私信怎么发呢?有qq吗?加qq给您联系。帮忙看一下谢谢!我qq是492807739

oneinstack answered 7 年 ago
私有的回复公网ip,root密码!

oneinstack answered 7 年 ago
iptables的端口32491请加在80端口下一行

lebuy answered 7 年 ago
我用iptables -L 查看
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:32491
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ftp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpts:dnp:ndm
 
里面没有80端口啊  是http那个吗  是在http的下面吗 我放到http下面了 还是403错误 什么问题呢?