amazon-web-services


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?

Related Links

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

Categories

HOME
android-studio
plesk
ontouchlistener
concurrency
add-on
devexpress
embedded-resource
vsts-build
typeerror
tcp
liferay-7
material-components
azure-mobile-services
sympy
lda
lc3
solution
fasm
nexus3
mailmerge
squirrel-sql
sql-injection
orange-api
sonicwall
fresco
twisted
word2vec
clr
gitkraken
channel
plyr
python-appium
strophe.js
python-imageio
gravity-forms-plugin
cube
mongodb-3.4
overwrite
kendo-listview
polyml
autoencoder
subclassing
runtimeexception
elastica
oauth2
game-center
angular-datatables
1wire
google-prediction
elasticsearch-aggregation
latexml
qvtkwidget
ilrepack
gestures
freshdesk
ptvs
stateless-session-bean
predicates
nrf51
cefpython
researchkit
data-management
nvda
spring-mongo
perforce-integrate
right-to-left
wicked-pdf
gridbaglayout
flask-security
odesk
phpquery
openshift-cartridge
calcite
supercomputers
incron
createfile
prism.js
cpu-time
iosched
particle-swarm
ctp
non-ascii-characters
iirf
stty
quickgraph
sly-scroller
web-frameworks
cyrillic
red-system
taskkill
flymake
fbml
delphi-prism
firefly-mv
botnet
mediacontroller
photo-management
solandra
resharper-5.1
principles
projectpier
inversion
jboss-mdb
rootkit

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App