Showing posts with label website hosting. Show all posts
Showing posts with label website hosting. Show all posts

Sunday, April 12, 2020

Creating a more permanent webserver

Started w/ research...


What is the best EC2 instance to use with a WordPress website?

4 Answers
Jon Green
Jon Green, AWS consultant; Cambridge AWS User Group organiser

OMG - it can't be this hard...

Followed by Cloudways!  It set it all up, free, no hassle, and works with AWS.  So, that's awesome - they do all the work for me!

...and then I found out I can't edit my own .php files properly in SSH.  Fuck.


...yeah, fuck that.  going back to Cloudways.

Figured it out!  VARNISH feature is what was fucking it up.  Turned that off and it works now.  Interesting.

DNS is setup.  @, www, and blog are all set.  DNS moved to GO DADDY.  AWS a

Now i have

Sunday, October 18, 2015

Day 21

Chatter

Holy shit I am distracted today.
-Thinking about nearly being in a fight with a redneck.
-The whole Kris fiasco
-Yvette
-Sarah (and all kinds of things associated with this)
-Luke Bryan concert awesomness
-Joel
-I'm sure I can spit out half a dozen more.

This is why Friday nights are party nights and Saturday nights we take it easy / don't drink alcohol.

Still, last night was pretty crazy.

So working despite the challenges is my path to victory.  TODAY this is SUPER IMPORTANT, as I am in a DEEP HOLE at the moment.  Next week needs today to be strong, and I got Sarah call in an hour and parents at 4.  Shall I begin?

----------------

Plan & Log

10 - 11 Power hour and meditation

11 - 12 Connect to server, try to get a generic wordpress home page instead of the generic .html page on there.

12 - 12:30 / 1, break, talk to Sarah and eat something.

12:30 / 1 - 2 complete wordpress implementation or if done figure next step.

-----

10 - 12:45 given work up to 12:15 and today's lunch allowance I am giving 30 minutes.

LOG-OUT: 12:45 - 1:30 ... distracted / trolled / post lunch unfocused.

LOG-BACK-IN 1:30 - 3:45... 5 hours on the nose!

5 hours = PASS :)


GOGOGO

----------------

Work

Well this is gold... go down to "install wordpress" and just copypasta.  Also it basically shows you where to find it, so now I just need to go looking for it :)

GOOGLE EVERYTHING.  God, I just asked "how do i tell if wordpress is installed on ec2" and BAM "How to install wordpress on ec2".  Perfect.

http://coenraets.org/blog/2012/01/setting-up-wordpress-on-amazon-ec2-in-5-minutes/

First I have to connect of course... instead of doing the whole firefox thing I notice that for future benefits it may be best to use what appears to be the #1 way Windows users connect to an Amazon Linux Server Instance... using "PuTTY"

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html


NICE!!! I am connected via SSH.  I AM BACK IN!!!

"

Transferring Files to Your Linux Instance Using the PuTTY Secure Copy Client

The PuTTY Secure Copy client (PSCP) is a command-line tool that you can use to transfer files between your Windows computer and your Linux instance. If you prefer a graphical user interface (GUI), you can use an open source GUI tool named WinSCP. For more information, see Transferring Files to Your Linux Instance Using WinSCP."

Why, yes, Amazon.  I WOULD prefer a graphical user interface, that can totally let me drag and drop and link windows directories with my Unix directories.  Fuck yes, I would like that.
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html#Transfer_WinSCP




Found wordpress... yes... everything IS installed and I know how to find it now.

It is here: var/www/html/wordpress

However, it is running VERY slow and is clearly broken.  I'm guessing I broke it last time possibly when I tried running the plugin.

I wonder if it's possible that Apache Web Server, PHP, MySQL, or Wordpress itself is not installed correctly?

--

Elastic IP associated with Instance, to help link up the domain to it later, per the end of the guide I was reading.

You can now connect to the site via: 52.11.177.228

IMPORTANT!  You need to use this address when SSH'ing or anything else.  I saved the changes.

--

I DO NOT HAVE PERMISSION TO DO ANYTHING ON THE SERVER OTHER THAN IN MY OWN USER FOLDER.

Obviously, this is a problem -- it's my server, I should be able to touch anything and everything, right?

So this implies that the problem originally with the FTP / plugin was likely security.  Just cuz it can FTP stuff over doesn't mean it can add, delete, or edit anything in the var/www/html/wordpress directory.  

The next step is getting security to let me in.

..
IAM review from Day 8's security concerns over plugin.

IAM is not currently the problem with me getting full access to my server; It is a way to give other users, groups, and programs (like your wordpress plugin) the permissions they need.

It's more a solution for a large company... might help me get the plugin in.

So, now what?  Do I dig around in security features?

Talked to Dad... says it's cuz im a user not an admin.  

Recommended I get a windows server.  I think he's concerned that i am tied down in Unix confusion but that's really not the case.  Long term he explains you can do anything with a windows server and that makes sense but I just want a wordpress blog.

So starting tomorrow i need to figure out how to get admin privleges... it might have to do with the "root" user or something, maybe IAM can do it.

Monday, October 5, 2015

Day 8

FYI, using "day #" for title now as that is kind of the way to go.

Monday, September 28th was Day 1.
Wednesday, December 23rd, is the planned Final Day (assuming I am around.  Thursday is Christmas Eve, and I don't work Christmas Eve)

Ergo, there are 87 days in this challenge, if you count weekends.  That's actually a lot considering the entire last week of the year is not part of the challenge.

---------

Okay, so we're looking at 645 - 745 tonight here now yaa.

---------

Okay -- Day 22's post.

The article I am trying to follow assumes I have a working wordpress site, which I am assuming I did and I did it on my core howtofixinsomnia.com and I did it on my EC2 server.  Since the error was related to my EC2 server not having FTP installed, it makes sense that I had a working wordpress site on that server.  I am hoping I did have that up and running.

IF I DID NOT, that would explain the entire problem... it can't work with the server's directories, because there are none, because wordpress is not on the server in the first place, so obviously the plugin is not going to install.

Once I solve that, it's all fairly easy (hopefully) -- I use the plugin to sinc S3 & Cloudfront with my EC2 server blog and it's all peaches and cream.  From there I put all web files on S3 and mainly just work on everything virtually on the site itself.  Couldn't be a nicer setup.

So now I just need to confirm my wordpress blog is installed properly on EC2, and should that be the case, setup FTP correctly or try the whole "create the directories" thing.

-
*** issue COULD be that the plugin, and thereby, wordpress, doesn't have permissions / IAM / access to EC2.  So even though it runs on EC2, it can't pair itself with S3 or Cloudfront because wordpress is kind of like an outer-skin... it can't tap into it's own brain and edit it's own files, since that's all secure EC2 stuff.

This article explains, dude was having a hard time setting it up:
https://ulrich.pogson.ch/setup-aws-work-amazon-s3-wordpress-plugin

Keep in mind, the reason this issue didn't come up is the main article I am following assumes I just have my own established fully-functional wordpress blog on my own website.  It's not going to explain how to get server permissions to allow my wordpress to install plugins.  A good test might be to install any plugin that needs to install directories to unix... if no plugins will install, there's some communication, permissions, or other core problem at play.

----

Okay, the first issue at hand is HOW DO I GET ACCESS TO UNIX AND HOW DO I INTERFACE WITH IT??

I was using some program to do this with before, but I never mentioned it in the blog, so now I am digging around looking for one.

The FIRST LINE of this article implies to use a "client" like MindTerm or PuTTY:
http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-ssh.html
ehem
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mindterm.html
^^^ THIS looks like it... I think I remember this article.  Okay!  We're off to a good start here.

STEP 1: SERVER IS BACK ONLINE -- confirmed by the temp link:
ec2-52-10-178-133.us-west-2.compute.amazonaws.com

Isn't it beautiful?

Aaaaaannnd Chrome no longer supports Java, so I need to switch to firefox to use this particular plugin / "client" to interface with it.

I took a minute to ask Chrome, wtf?

And it's like, "Bro, only 1% of people actually use Java on their browser now a days, comeon bro, get with the times."

And I'm like, "WTF???"

So we can switch to firefox or install some sexy unix interfacing client... who knows... maybe that WOULD help... I dunno... I kind of like that Amazon has a default one... I think I will just switch to firefox or even give the ol' explorer a try...

And it's passed 7:45.  Hour's done.  You pass.  I will return to tomorrow, install firefox, interface with my server, and attempt to figure out where wordpress is and how to get it running properly, so that I can then find a way to get it to be able to add plugins to itself and shit.

Saturday, January 17, 2015

Day 12: Gap-start next week

So week 3 begins today.  Saturday.  Thanks to Kris.  Who made me do it, and then proceeded to cancel on me AFTER I'd already started.

Anyways, here are the goals for the week:

1. Complete implementation of Salient web theme.  This is the primary objective.
2. Begin creating my website's content (tweaking the theme, getting the video and opt-in on there, etc.)
3. See if I can, and if possible, begin recovery and transfer of all worthwhile content from HostGator.

So I worked 8 hours (excluding lunch) at LEAF today, putting me around 70 hours for the week.  And I am noticing I am quite irratible.  For instance, I woke Chris up when I got home for leaving the pizza box wide open, spread across the kitchen table.

Anyways, to get on point here, I think today starts with me watching that video from day 10's post.  So I'm gonna go do that now.

AWS Training

So pretty straight forward stuff.  Not to say I have it working yet... I don't.....

The AWS console basically has everything.

To make a wordpress site with necessary databases and software all setup for you, all you need to do is goto their "cloud formation" tool and "create a stack".  I suppose this means you're creating a whole stack of tools on it's own cloud server.  Pretty fuckin' cool.

When I tried to do this, it failed.  My error was either exactly the same or very similar to this person I found online (not linking since they are doing things a bit different from me, creating a bitnami cloud whereas I just want a normal wordpress cloud.):

"The stack creation failed though and when looking in the Events tab for the stack I see the status CREATE_FAILED with the reason The key pair 'default' does not exist."

The issue seems to be that I don't have this "key" setup.  It seems for it to create a database and have it be secure and what not, I need a key.

It's been over an hour so we'll pick up where we left off and try to learn about "key pairs" when we return.

Bryan's in town.  :)

Thursday, January 15, 2015

Day 10

Implement and test salient today... and the weeks goals will be complete.

Just starting to do this is the completion of the goals I believe... double check...

Okay, 2 extra things:

1. -Do I still need the links, data, etc?  How does Google Analytics play into all this?"

So there is data that should be saved, affiliate links to retrace, and content to recover.  This is definitely going to take a while and may be the big focus of next week.

Analytics runs separate and all that data is saved.  I just need to begin a new analytics project for the new site, and that can be on the same account.

2. What else, if anything, do I need to do to get everything operating on AWS?

Biggest missing piece is the advanced AWS stuff -- how to install PHP, SQL, and other required features into my AWS site so it's configured properly to run wordpress, my theme, etc.  As I have just discovered.

And I am starting right now by starting a new post that defines all the technical terms I am coming across... since I clearly don't understand basic shit like:
-"WTF is SDK?" (It's software developer's kit.  See definition I found.  Thank you, Google.)
-"WTF is this Composer Amazon is talking about?"
-"WTF are dependencies?"
I am going to do a compromise here since there's like... an hour's worth of training and making accounts JUST TO START installing the codes I need on my AWS.

The compromise is this: A list of what needs to be done to finish implementation next week.

And here it is:

Salient REQUIRES WORDPRESS.

WORDPRESS REQUIRES:
  • PHP 5.2.4 or greater
  • MySQL 5.0 or greater
  • The mod_rewrite Apache module
HOW TO:


^ includes wordpress

ALL SDKs: Basically, the software developer kits for ANY platform that can work with AWS... kind of the "go to" page for "How to install X on AWS"

http://aws.amazon.com/tools/


PHP:
(recommended: install composer: https://getcomposer.org/)

Amazon SDK for PHP: http://aws.amazon.com/documentation/sdk-for-php/


SQL: See video above first.

This may help or may be completely unnessary / do nothing: http://aws.amazon.com/rds/sqlserver/


MOD REWRITE APACHE MODUAL

see video above... so tired... all I see is "apache helicopter model" right now.

:)

Good week.  All objectives complete.



Wednesday, January 14, 2015

Day 9

Man, I have a hard time NOT putting 2 hours into ROARS every day.

Today...

Got Back Into TheVault.bz

Enough said here.

Found out TheVault.bz Offers Web Themes

Biggest one catching my eye is Salient -- "SEO Optimized" and the exact theme I was looking for:

http://themenectar.com/demo/salient-one-page/

http://themenectar.com/demo/salient-frostwave/features/elements/

All Demos -- http://themeforest.net/item/salient-responsive-multipurpose-theme/4363266?ref=nfo23
(Edit: just noticed on this page, you scroll down far enough you'll see what they have to say about their SEO... fucking perfection.  Salient is the winner I believe.)

Next is "super SEO" Strategy.. still good but has the sidebar, it's down the page a little which is good, but not sure if it's what I want.  Admittedly, much better if I still want the blog on my page... but less sexy and I'm unsure (especially because most of the super SEO stuff seems completely unnecessary for me and redunant.)


I've downloaded both and moved them into the web folder.

Probably the best approach is get it installed (I noticed Salient came with excellent instructions) and test it, if you get it working and like it, probably best to buy the liscense.

There's a lot more themes where those came from... but seems like biting the bullet and using Salient is a great way to go here,

Browsed a little

Obviously, the vault is loaded and takes a while.  Best thing to do seems to be to sort by date, so I start with the most relevant stuff.



Monday, December 8, 2014

How to make an AWS site

Basically, make an S3 bucket, config it as a website, and put files there as normal.  Once confirmed working (mywebsite.s3.aws.randomstuffhere.com), then use "Route 53" to config the domain name and BANG you're done.

I will test this out tomorrow with a WORDPRESS BLOG (generic one to start, with no domain port)

Here is the tutorial: http://aws.amazon.com/websites/getting-started/tutorials/

Go down to the wordpress lab... take that... its 45 min... so that will be a wrap for tomorrow.  By the end of wednesday I'd like to have an operating site of some kind.

Note: EC2 is just to config it with speed... don't worry about this for now.

Thursday, December 4, 2014

Reviewing AWS Web Hosting and Insights to testing speed


TL;DR -- It is a big YES.  Go go: http://aws.amazon.com/websites/

It's hard to get a review on AWS web hosting, since google is cluttered with everyone using all these search terms / keywords as ways to go "I have a great review" and then just advertising a "Top 10" list with affiliate commissions packed in, causing super bias.

What's worse is getting creative won't help -- the keyword market here is so saturated the only way to search it is forum searching.

However I did find something interesting: You can buy a website host through a company that uses Amazon cloud for 100% of their hosting.

So if a hosting company is using amazon to run everything as opposed to owning their own servers... I'm guessing that's the way to go:

https://hostedftp.com/

And it makes sense.  Look at LEAF: Software verticals aren't buying servers any more -- they are simply moving to the cloud.

THE CLOUD = NEW TECH

The cloud means your speed isn't reliant on a server or even location -- it's reliant on virtual servers supported by an infastructure of servers.

New tech, other people relying on Amazon, whole companies making the switch, not to mention scalable costs, all lead me to one conclusion -- I must try and test Amazon.  The answer has been obvious the whole time... tonight's work has just helped me realize I'm probably not making a mistake speed wise (although price wise?  Still uncertain.  But given the costs I've paid for their service already, I'm not too worried.)


What WILL Slow it down and How to Test:

The following is from: http://www.copyblogger.com/website-speed-matters/

"What slows down site speed?

The first place to look is your host.
Your speed problem may be from the uneven quality of service that comes with sharing a server. Some days are good. Some days are bad.
It could also come from choosing a generic hosting provider as opposed to one whose stack is finely tuned for your CMS. For example, WordPress users will see significant performance improvements by going with a premium managed WordPress host.
A good managed host should also be able to help you solve the litany of additional factors that could be slowing down your site. I’ll list a few here and then jump into what you need to do to test for these issues.
  • Widget or plugin overload: In this category you’ll find common household names like a comment plugin or Hello Bar — notorious for killing page speed. In fact, Matthew Ogborne discovered that his Facebook Like button was downloading 83 Kb of data at 1.34 seconds of load time. He yanked it. Joshua Bixby had the same reaction when he discovered that it took 2 seconds to download the original Google+ button. Google has since fixed the problem, but the lesson is clear: know what kind of burden a widget or plugin will put on a site.
  • Too Many Ads: Of course there is a temptation to display ads once you’ve got high levels of traffic. However, one of the major causes of high-bounce rates are slow-loading ads. Weigh the cost of each additional ad.
  • Bloated images: Giant graphics can grab attention and pull readers in. But large images can also make downloading the page a burden.
  • Incompatible Browsers and Apps: Chrome and Shockwave Flash are a great example. They don’t play nice. Who to blame? Google, of course, but it’s your responsibility to test your site (and all the pretty trinkets hanging from it) across browsers.
  • Design Theme: A theme is your blog’s paint job. It’s what makes heads turn. It’s what makes people bristle with envy. And in some cases, it’s what makes your site painfully slow. Use a framework that works.
  • Analytics Code: That snippet of code you dropped across your site to measure performance might add a hair’s breadth of drag to your site speed. Maybe 100 milliseconds here. 100 milliseconds there. But it all adds up.
  • Sign Up Forms: The back end code of a sub form (like Aweber or Google Feedburner) can make additional calls to your SQL server that trip up your speed.
  • Affiliate Code: Another line of code … another call to the server … keeps your site crawling.
The issues above … bandwidth thieves. All of them. Here’s how to round ‘em up.

6 tools to test your site’s speed

Fortunately there are plenty of free tools out there to test how fast your site is. And except for the Plugin Performance Profiler, there is a lot of overlap between the tools.
Since these tools are fast and free, it’s worth testing your site on all of them to see if there are problems another tool might miss.
Drop your URL into the text box of this dandy little tool, click “Submit,” and you’ll get an instant report of your site’s performance. You’ll see a list of recommendations that are broken down into high-, medium- or low-priority. If you are the curious sort, you can even explore the experimental recommendations (but not until after you knock out the others). A must use.
Joost de Valk of Yoast.com created a sweet Google Analytics plugin that includes a Site Speed feature, too. Performance reports will show you how quickly or slowly your page loads across different browsers and around the world.
If you want to test individual pages, Pingdom can deliver some robust reports. The nice thing about Pingdom is that your results will reflect real-world conditions, because the tests are performed on real browsers like Chrome.
4. YSlow
Yahoo! designed this tool based on their rules for high performance pages. Run a test and you’ll get a summary report that includes recommendations for site performance. What makes this tool unique is the performance analysis tools they offer, like Smush.it and JSLint.
Anyone who uses WordPress knows that plugins are a beautiful thing. These applications can help you do just about anything you want. Theme-Check tests your theme to make sure it meets WP standards. TweetMeme adds a button that lets visitors share your content on Twitter. PopUp Domination may help you capture leads.
There are more than 21,000 plugins to choose from. But each one adds a cost. Each one can steal bandwidth and make your site crawl. So you have to make hard decisions about which plugins are worth the extra load to your site. The Plugin Performance Profiler will audit your plugins and identify which ones are hogging bandwidth. Root out the culprits — and then disable it when you are done.
This test simulates thousands of users hitting your site at the same time — which might happen if you get a tweet from Lady Gaga or a link on the front page of Reddit. You’ll be able to see where your site breaks, spot your bottlenecks, and fix problems before real users land on your site.

In conclusion …

Building and maintaining a fast website comes down to these general principles: eliminate what you don’t need. Run new features you want to add through a cost/benefit analysis. Keep whatever you truly need. Ditch whatever you don’t.
The most efficient way to get this process started? Make sure the right hosting company is running your site with the right software."