Setting up LAMP Web Server on AWS EC2 t1 Micro - amazon-web-services

I'm sorry for being dumb, but I am really stuck for few days. This is my first time using AWS. I have successfully installed LAMP web server under t1.micro on my customer's AWS account http://54.72.132.215/ following this tutorial . But I don't know what to do next after the installation. My goal is:
Setup a Domain
Run a Prestashop.
I hope you can guide me to the right path, I am totally lost. Thanks.

You need to register a domain with someone, this is outside of Amazon. Just google domain name registrars:
https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=domain%20name%20registrar
Then you'll need to point your domain to your Amazon EC2 instance. I would suggest using Route 53 to do this, another Amazon AWS service that makes it easier to setup and control your domains:
http://aws.amazon.com/route53/
Once you have that setup, visiting your name domain should show the default apache It works! page, if you've correctly setup your LAMP server. It'll look something like these:
https://www.google.co.uk/search?q=default+apache+web+page&espv=2&source=lnms&tbm=isch&sa=X&ei=yRfWU_v8OeHe7Abp1ICICw&ved=0CAYQ_AUoAQ&biw=1457&bih=881#imgdii=_
You'll want to add a new vhost for your new PrestaShop site, this will allow you to setup a specific set of files to serve for your new URL, and means you can add other sites to the server later on. Just a quick google shows multiple tutorials on doing this, here's one of them:
http://calebogden.com/multiple-websites-amazon-ec2-linux-virtual-hosts/
Then follow the tutorial in the PrestaShop documentation about installing PrestaShop via the command line:
http://doc.prestashop.com/display/PS16/Installing+PrestaShop+using+the+command-line+script
Now I'm guessing that all those steps in one go is a little overwhelming, so I would suggest you break this task down into chunks and work on them one at a time, and post a few different questions on StackOverflow and probably ServerFault: https://serverfault.com/, as that is better suited to setting up servers.
To summarise you need to:
register a domain name and point it to your EC2 server, you should see the default apache page
create a new vhost to server web pages for your new domain
follow the guide on PrestaShop about installing the software
Treat each of those a separate task. This question covers lots of topics in one very general idea, the full answer to your problem wouldn't really fit in a single post.
ServerFault will probably have a lot of your answers already, regarding setting up domains and vhosts at least.

Related

process of deployment independent websites from SaaS Application

first of all I'm not sure how I can explain myself since I'm not native English speaker but please bear with me in the following scenario: I have a lot of customers where they need a simple blog website with their own domain name, instead of me registering on host service provider and deploying that blog website manually I'm looking for a better automated solution for example it would make a lot of sense if they use my own platform so after a successful registration/payment on my platform their website is deployed independently on private server instance (with their own specific config) ... Im not really looking for an answer on exactly how to implement that but what that process is called (the deployment part) or under what category should I dig to learn more. your advice is much appreciated.
There can be multiple approaches to solve the problem.
However, simple one will be using AWS SDK to create EC2 instances with Bitnami wordpress image.
You can trigger the API with parameters which will auto-install wordpress, configure dns and other stuff and provide the ready to use website within seconds.

What are the steps to deploy django project that warks localy to production

I am sorry for asking such a wide question. But i have built website with django that works locally and now i need to deploy it in production. I wanted to try to do it with first with free hosting like Heroku but it caused me with problems with my postgresql, so i decided to to post it in production and spent month for final testing in "real world". Can someone give me just steps that will lead me to that goal. this is my first website and i am really confused with the variety of options that i can use to do it. I found some articles but they were outdated mostly and most of them proposed different solutions that confused me very badly. Would really appreciate just a simple list of steps for deployment, like which hosting to use for starting, how will it work with local domain if i get it country in Central Asia. Will that cause my website work slower or not? Will be grateful for anyone's response and suggestion, cause this deployment process confused me so badly, that i can't solve it without help from experienced programmer
Deploying django app in production on your local system is similar to deploying it on VPS
You can use this link by Django project or this link by digital ocean to deploy your dango app on your local system. I would suggest you to use digital ocean link.
You can use this link by heroku devcenter or use this link by Marina Mele to deploy it on heroku
If you are primarily looking to test the app, then pythonanywhere is a good option for you. With its free account it provides you 500mb of disk usage, a domain name like "yourapp.pythonanywhere.com".
If your app has more requirements, then you can check out their paid plans.
How will it work with local domain if i get it country in Central Asia. Will that cause my website work slower or not?
The response of your website does not depend on the domain name you buy, it is just to route website users to your website using easy to use/remember address. The response of your website depends more on the performance of VPS or whatever that servers your webapp.
This is my first website and i am really confused with the variety of options that i can use to do it.
You have many cost efficient options like using free tier of Amazon Web Services. But as you have mentioned that this is your first website, you may find it difficult to use it, since aws is largest provider of Platform as a Service, and has lots of things in store to offer.
At this stage you may find using Digital Ocean very easy. In my experience, I have found that digital ocean is more user friendly than AWS.

steps to take website from local server to hosted server (going live)

I am very new to web development, and have a question in regards to taking your website "live."
I coded my site in python, using the Django framework. I have all my code stored in a local server, and want to move ahead with taking my web into production.
I've been looking online on any resources that provide a clear step-by-step instruction of going public with your site. However, they are either all unclear, extremely complicated, or based off "wordpress." I'm not using wordpress.
I understand the basic rules:
get a domain
get a web host
get a ftp
??
my confusion is somewhere between 3. and 4. What happens after you get a FTP? Am I using GitHub at any point in this process? Are there special rules I have to follow (what do you do with your secret key in the settings.py?)
If you know of a great resource for beginner web developers who are trying to take their website live (and who are NOT using wordpress), I would truly appreciate your guidance.
thanks much!
There is no need of ftp or anything else
i used godaddy.com
i just brought a domain name then hosting space
no other thing i purchased
then i uploaded my files to website in sequence
just thats it

Proxying external images for SSL compliance

I've got a little Django site in which users can link to images on other sites in their comments. It's by no means a core feature.
I've just moved the entire site to SSL. That has worked fine for the most part but remote images are obviously not always going to be available over SSL. Only the slightest number of domains have valid certificates.
What's the best way to funnel images through then?
Download them when the user posts and alter the URL to a local one?
Make a proxy that just proxies another URL?
The second seems like less work (I feel like it would be possible just with NGINX rules) but that it would also open the site up to people using my proxy for their own nefarious gain... Which I'd like to avoid.
What's the best compromise here?
Github ran into this same issue when they moved to HTTPS everywhere and detailed it in their blog: https://github.com/blog/743-sidejack-prevention-phase-3-ssl-proxied-assets
Their solution was to create a proxy server which they open sourced as https://github.com/atmos/camo To address the same concerns about abuse of the proxy it is deployed with a shared secret with the application server. Integrating this would a Django project would be straight forward as you would just need to generate the digest from the shared key for the given image url.

Authentication with apache2 php pages and tomcat REST calls

Hello smart people on stackoverflow,
I would be very happy if someone could point me to the right libraries/frameworks to do what I want.
We have the following web architecture set up.
1. We have a tomcat server that offers REST services.
2. We have an apache2 server that serves up php pages to users.
a. Some of these php pages make REST calls to tomcat for data.
b. Other php pages contain javascript that makes REST calls that are routed through apache2 via mod_proxy to tomcat. e.g. All request to http://myapache.com/PASSTOTOMCAT/rest/getSecureData would go to tomcat.
Now, I'm asked to add authentication to everything, both the user pages as well as the REST calls. It would obviously be ideal for the user to sign-in once for access to both.
What library can I use for this? I don't think I can use any php-based solution (ie. one that involves adding a ) because the pass-through url's won't have a chance to add this code and check for authentication. I think I need to use something built into apache2 itself.
One minor requirement is that I would like the user credentials stored in a mysql database as opposed to a file.
Am I over-thinking this?
Thanks in advance
Well it's been 5 days, so I guess I'll answer my own question...
I ended up using the new mod_auth_form for authentication because it lets you use a nice stylized webpage to log users in.
I also used mod_dbd to access user credentials in mysql.
I couldn't find a nice tutorial on this so I struggled through the installation and setup a bit, but if anyone cares, I created a set of instructions on my blog in case anyone else tries to do the same thing.
Installation
Setup