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

logs available on cloudwatch even after stopping the agent on the server
after trying to configure my aws cli, nothing is written in the crendentials and config files
How does distributed architecture work for serving out dynamic and static content
AWS - Creating a Route53 subdomain in a separate account to the top level domain [duplicate]
How to set startup page on AWS Elastic Beanstalk
Can I get credentials by AWS IAM Role published by another aws account?
AWS asking me for a passphrase for key: EC2
How to define IAM Policy for a user to have programmatic full or limited access only for specific dynamodb tables?
Good deployment in aws with Symfony
How to get the end time of AWS EBS volume snapshot ? I want to find out the time when the snapshot completed
copy specific data in one s3 bucket to another bucket using data pipeline
AWS CodeDeploy using Github Failing
Tool to orchestrate execution of AWS CloudFormation templates
Updating ElasticSearch mappings field type with existing data
Is there a way to use the CLI to configure an Alexa skill?
Why won't my node / Heroku app connect to RDS?

Categories

HOME
qt
openshift
gaming
softlayer
selenium-builder
hid
gallery
greasemonkey
iptables
flurry
mosquitto
turbojpeg
jint
haxe
stored-procedures
colors
android-externalstorage
sonicwall
hidden
rpmbuild
google-sites
jaspersoft-studio
adobe-illustrator
clr
android-permissions
sharedpreferences
tortoisemerge
adapter
fusion
basic-authentication
docx4j
locks
objectmapper
xcrun
plantuml
cucumber-junit
gsp
apptentive
android-canvas
dreamfactory
xvfb
identify
elastica
oauth2-playground
web-inspector
code-push
libreoffice-writer
karabiner
embedded-v8
pen
palindrome
clrs
email-forwarding
1010
kendo-editor
apache-modules
gmaps.js
dcount
bilinear-interpolation
ajaxmin
node-glob
exists
persistent-object-store
gravatar
seadragon
management-studio-express
stack-smash
http.client
auto-generate
libz
vdm-sl
ipod
prism-4
subfolder
mathematical-expressions
debug-symbols
sql-processor
comctl32
back
maven-central
senchatouch-2.4
refit
bittorrent-sync
xmi
visual-c++-2005
saga
hyphen
acitree
iirf
virtual-channel
xs
axacropdf
days
ofstream
django-filebrowser
xmlwriter
jsplitpane
getopt-long
algol68
quartz-core
azure-acs
upshot
qcar-sdk
facebook-fbml
subtext
downcasting
tso

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App