apache外网不能访问,应如何解决

master_sun 2010-03-29 11:19:00
大家好,我做了一个OA系统,在本地局域网内能正常访问运行。web服务器是apache2,我已做了路由器端口映射。但外网还不能访问。内网的ip是192.168.1.166,外网ip是58.57.58.118
下面是我的apache配置文件httpd 内容:

#
ServerRoot "c:/wamp/apache2"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:8001
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
#
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
</FilesMatch>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ../logs/apache_error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

#
CustomLog ../logs/access.log common

#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog logs/access.log combined
</IfModule>

<IfModule alias_module>
#
#
ScriptAlias /cgi-bin/ "c:/wamp/Apache2/cgi-bin/"

</IfModule>

#
# "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "c:/wamp/apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>


# Virtual hosts
#Include conf/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
#Include conf/extra/httpd-dav.conf

# Various default settings
#Include conf/extra/httpd-default.conf

# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
# starting without SSL on platforms with no /dev/random equivalent
# but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>


Include "c:/wamp/apache2/conf/alias/phpmyadmin.conf"
Include "c:/wamp/apache2/conf/alias/sqlitemanager.conf"
...全文
3286 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
longchengheima2009 2010-04-15
  • 打赏
  • 举报
回复
检查检查你的防火墙,这个问题我原来也遇到过
防火墙一关闭啥问题都没有了
caloer 2010-04-14
  • 打赏
  • 举报
回复
换个端口吧
一般电信的80端口不能再对外了,要办很多手续
mrshelly 2010-04-03
  • 打赏
  • 举报
回复
检查网络....
master_sun 2010-03-31
  • 打赏
  • 举报
回复
是的,我的服务器是电信用户,有的电信用户能行,网通的用户不行。什么原因?
mrshelly 2010-03-30
  • 打赏
  • 举报
回复
如果你的端口映射正确. 那理论上外网是可以访问的了.

可能是你测试方法不正确..

你是不是在内网访问外网IP时, 出现了路由器登陆界面?

24,923

社区成员

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

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