Ubuntu16 apt-get安装apache2公网ip不能访问-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

Ubuntu16 apt-get安装apache2公网ip不能访问

茂800 2017-05-19 16:48:29 2770

防火墙已关闭; wget localhost、wget localhost:88 和 wget 可以正常获取index.html页面;但是 wget 公网ip 不能获取到index.html页面,且一直处于connecting状态

    root@iZwz9facu0pduhjuicufmqZ:/etc/apache2# wget
    --2017-05-19 16:35:53--
    Connecting to 


Sets the default security model of the Apache2 HTTPD server. It does

not allow access to the root filesystem outside of /usr/share and /var/www.

The former is used by web applications packaged in Debian,

the latter may be used for local directories served by the web server. If

your system is serving content from a sub-directory in /srv you must allow

access here, or in any related virtual host.

    Options FollowSymLinks
    AllowOverride None
    Require all denied

    AllowOverride None
    Require all granted

    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted


AccessFileName: The name of the file to look for in each directory

for additional configuration directives. See also the AllowOverride


AccessFileName .htaccess

The following lines prevent .htaccess and .htpasswd files from being

viewed by Web clients.

    Require all denied

The following directives define some format nicknames for use with

a CustomLog directive.

These deviate from the Common Log Format definitions in that they use %O

(the actual bytes sent including headers) instead of %b (the size of the

requested file), because the latter makes it impossible to detect partial


Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.

Use mod_remoteip instead.

LogFormat "%v:%p %h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" vhost_combined
LogFormat "%h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

Include of directories ignores editors' and dpkg's backup files,

see README.Debian for details.

Include generic snippets of statements

IncludeOptional conf-enabled/*.conf

Include the virtual host configurations:

IncludeOptional sites-enabled/*.conf

vim: syntax=apache ts=4 sw=4 sts=4 sr noet

安全 网络安全 Apache 开发工具
取消 提交回答
  • 茂800
    2019-07-17 21:11:44



    1 0
+ 订阅