Unable to use php on Amazon Linux: The requested URL was not found on this server

Asked 2 years ago, Updated 2 years ago, 108 views

I'm a beginner in programming.
I am creating an app that displays data in the database on Amazon Linux. I'm trying to insert httpd so that I can see it from my browser.

commands used:

 sudo yum install httpd-y

ls
datalink.php webpage.zip

sudo service httpd start 

US>From your browser
http://ec2-xxx-xxx-xxx-xxx.ap-northeast-1.compute.amazonaws.com/test_server/datalink.php

Accessing the

Not Found
The requested URL was not found on this server.

said he.

as seen in the developer tool
Failed to load resource:the server responded with a status of 404

It says that the file cannot be found.
I wonder if the web server has been installed correctly...

I'd like someone to teach me.

php linux amazon-linux

2022-09-30 19:20

1 Answers

Is the file you want to view stored below the directory specified in the apache configuration file, httpd.conf document root configuration?As you can see in the error message, there is probably no file you would like to view in that location.


2022-09-30 19:20

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.