【问题标题】:How to run Apache on AWS EC2 Cloud9如何在 AWS EC2 Cloud9 上运行 Apache
【发布时间】:2019-04-11 09:41:51
【问题描述】:

我从 Cloud9 迁移到 AWS Cloud9。我无法看到 Apache 服务器的预览。服务器正在运行:

ubuntu@ip-172-31-22-83:~/environment$ sudo service apache2 status
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: active (running) since Thu 2019-04-11 09:17:31 UTC; 17min ago
  Process: 791 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 997 (apache2)
    Tasks: 6 (limit: 1152)
   CGroup: /system.slice/apache2.service
           ├─ 997 /usr/sbin/apache2 -k start
           ├─1086 /usr/sbin/apache2 -k start
           ├─1087 /usr/sbin/apache2 -k start
           ├─1088 /usr/sbin/apache2 -k start
           ├─1089 /usr/sbin/apache2 -k start
           └─1090 /usr/sbin/apache2 -k start

Apr 11 09:17:29 ip-172-31-22-83 systemd[1]: Starting The Apache HTTP Server...
Apr 11 09:17:31 ip-172-31-22-83 systemd[1]: Started The Apache HTTP Server.

但是当我尝试预览服务器时,没有任何效果:

  • 本地主机/

客户端关闭请求 499 - AWSCloud9VFSService VFS 连接不 不存在

  • 本地主机:8080

无法获取 /vfs/80990xxxxxxxxxxxxxxxxxxxxxxxxxxx/previewlocalhost:8080

我已经试过了:

https://docs.aws.amazon.com/cloud9/latest/user-guide/app-preview.html#app-preview-app-reload

但它是一个假服务器,不加载根文件index.php。它显示文件夹中的文件列表,不考虑 .htaccess 文件。

我也尝试根据Configure apache to listen on port other than 80更改8080端口

【问题讨论】:

    标签: apache amazon-web-services amazon-ec2 aws-cloud9


    【解决方案1】:

    Apache 在 AWS Cloud9 上原生运行。要使 Apache 与 Cloud9 IDE 预览系统一起工作,您需要:

    详细的分步指南在this page

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-05-26
      • 1970-01-01
      • 2021-04-27
      • 2020-04-12
      • 2016-11-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多