Setup Apache runner in AWS Cloud 9

I have recently migrated several environments from Cloud 9 to AWS Cloud 9. On the old Cloud 9 I could run my environments with Apache . In AWS Cloud 9 Apache doesn’t appear in the ‘Run With’ drop down.

How do I set up Apache as a runner?
Thank you

Have a look at the following page, Apache setup is explained and detailed : How to configure and run Apache server on AWS EC2 Cloud9?

I followed those instructions carefully, but they don’t entirely work. When I press the green “run” button while viewing an HTML file in an editor, instead of launching Apache and giving me a URL to click on in the console, like the old C9 did, the AWS C9 does nothing. When I view the suggested index.php, I see a successful preview, but the console says:

Starting PHP built-in web server, serving https://3.84.27.65/index.php.
(standard_in) 1: syntax errorbash: line 9: [: -eq: unary operator expected[Fri Jun 14 22:20:36 2019] Failed to listen on 0.0.0.0:8080 (reason: Address already in use)

Process exited with code: 1
Pane is dead

Update: Sometimes, clicking “run” when viewing an HTML file yields a console error like this:

bash: line 1: taskmin/taskmin.html: No such file or directory

Which suggests that it’s trying to run the file using bash and also that it can’t find the file.

Is there a way to get the old C9 behavior?

If you want to run Apache, do not click the “Run” button. Click on Preview -> Preview Running application (at the end of this section)

The “Run” button runs the current configuration, but Build-in PHP server is not an Apache server, it runs PHP script, it is more like a PHP debug tool.

I already followed the instruction several times, it always worked for me.

I gave up on the runner and started and stopped apache via the command line.
On a different note I also gave up on AWS cloud9. I’ve moved to https://codeanywhere.com, the editor is not as nice (although nano seems to work a lot better in the terminal) BUT I managed to get all my important workspaces up and running within hours - I still haven’t got anything running in AWS

I managed to Migrate to AWS C9 quite easily. My LAMP and Node projects are running quite well. It is not as trivial as it used to be on the “Old C9” platform. But I would definitely say it’s worth going through the process. Definitely better than Codeanywhere.

Why AWS, such big company, is not abble to provide a service as good as the “old C9” ?