webdev_l 2017-05-19 09:12 采纳率: 0%
浏览 1974

阿里云esc Ubuntu16 apt-get安装apache公网ip不能访问

阿里云ecs安装配置lamp php环境,公网ip不能访问。mysql也不能在外网连接;新增了mysql的超级管理员(任意ip连接),使用这个管理员帐号也不能连接mysql。

wget localhost、wget localhost:88、wget 127.0.0.1、wget 127.0.0.1:88可以获取到index.html页面;wget 159.23.25.242 一直在connecting状态
root@iZwz9facu0pduhjuicufmqZ:/etc/apache2# wget 159.23.25.242
--2017-05-19 16:57:45-- http://159.23.25.242/
Connecting to 159.23.25.242:80...

apache2.conf:
LogLevel warn

Include module configuration:

IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

Include list of ports to listen on

Include ports.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

#

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

  • 写回答

1条回答 默认 最新

  • oyljerry 2017-05-19 09:23
    关注

    还要看看阿里云本身的VPC等安全策略,一般默认会禁用端口等,需要自己配置策略开放

    评论

报告相同问题?

悬赏问题

  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况
  • ¥15 画两个图 python或R
  • ¥15 在线请求openmv与pixhawk 实现实时目标跟踪的具体通讯方法
  • ¥15 八路抢答器设计出现故障
  • ¥15 opencv 无法读取视频
  • ¥15 用matlab 实现通信仿真
  • ¥15 按键修改电子时钟,C51单片机
  • ¥60 Java中实现如何实现张量类,并用于图像处理(不运用其他科学计算库和图像处理库))
  • ¥20 5037端口被adb自己占了
  • ¥15 python:excel数据写入多个对应word文档