EC2 web application folder structure
I have a web application which is currently working fine on my local machine and I am now trying to get it to work on EC2. I transferred the index.php file into the folder /var/www and I am able to access it by visiting my elastic IP (for example, http://123.45.678.910/ ). The trouble is that I also added the folder named restAPI into the folder /var/www which in turn has several files. When I try to access restAPI/index.php by going to the URL - http://123.45.678.910/var/www/restAPI/index.php, it gives me a 404 error.
There are two things at play here: The file system path The URL path If you're running an Amazon Linux image, your web content should be deployed inside /var/www/html -- as is the case with just about every reasonable Linux installation. If your index page is stored at /var/www/html/index.php, then your URL will be http://123.45.678.910/index.php. If you're trying to access http://123.45.678.910/var/www/restAPI/index.php, it means that you uploaded your file to /var/www/html/var/www/restAPI/index.php. Make sense?
AWS Lambda: Is it secure to store data on AWS Lambda local Disk?
Best way to automate a process to be run from command line (via AWS)
Resilient s3 notifications
Some “Condition”s disallowed in AWS S3 Bucket Policies?
Allow HTTP request based on URL and security group
CometD over AWS ELB
How to get JAXRS 2 (Jersey) verbose Trace to work with ResourceConfig
Private docker registry authentication in aws ecs optimized AMI is not successful
Generate swagger json definition for AWS API Gateway
AWS SNS is bypassing API Gateway and calling Lamba functions directly
Access S3 bucket from AWS EC2 via r command lines
Amazon CloudFront and HTTPsL What do I do?
nginx proxy_pass remote ip
SSL Certificates On Elastic Beanstalk Default Setup
Need email open and click events from amazon (aws) ses
Website hosting in specific folder on AWS S3