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

开发者社区> 问答> 正文

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

2017-05-19 16:48:29 4551 1

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

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

apache2.conf

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

directive.

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

requests.

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

取消 提交回答
全部回答(1)
  • 茂800
    2019-07-17 21:11:44

    我自己解答吧

    在控制台配置安全组规则,允许80端口和3306端口就能访问了

    1 0
相关问答

145

回答

【新手入门】云服务器linux使用手册

fanyue88888 2012-11-26 17:14:18 160125浏览量 回答数 145

34

回答

Win Server 2003-2016 加密勒索事件必打补丁合集

妙正灰 2017-05-15 10:44:38 284125浏览量 回答数 34

43

回答

【精品问答集锦】Python热门问题

小六码奴 2019-05-30 15:27:34 145194浏览量 回答数 43

39

回答

安全组详解,新手必看教程

我的中国 2017-11-30 15:23:46 263800浏览量 回答数 39

295

回答

Linux Bash严重漏洞修复紧急通知(已全部给出最终修复方案)

qilu 2014-09-25 13:26:50 438617浏览量 回答数 295

82

回答

OSS入门教程

belle.zhoux 2014-07-07 17:14:27 160392浏览量 回答数 82

251

回答

阿里云LNAMP(Linux + Nginx + Apache + MySQL + PHP)环境一键安装脚本

云代维 2014-02-14 15:26:06 310572浏览量 回答数 251

41

回答

【云服务器分享】简述云服务器对比VPS

dreamdoo 2012-10-08 16:24:18 128265浏览量 回答数 41

24

回答

【精品问答】python技术1000问(1)

问问小秘 2019-11-15 13:25:00 486881浏览量 回答数 24

13

回答

游戏云精彩帖汇总

nono20011908 2014-08-22 11:00:12 205337浏览量 回答数 13
+关注
0
文章
5
问答
问答排行榜
最热
最新
相关电子书
更多
JS零基础入门教程(上册)
立即下载
性能优化方法论
立即下载
手把手学习日志服务SLS,云启实验室实战指南
立即下载