我从 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 文件。