Home > Programming, Servers & Scripts > Hosting, Servers & Security

I need a webhosting solution that supports PHP. (16)


08-19-2017 04:09 PM #1 annvirz (Member)
I need a webhosting solution that supports PHP.

I need a webhosting solution that supports PHP.


Right now I got my storage from S3, a DNS from route53 and a CDN from cloudfare, but this flow doesn't support PHP files which I need to root my root traffic to different landers based on certain conditions. As far as I understand there isn't a CDN that supports PHP files.


I've been looking into a few solutions. First of all getting a dedicated virtual server from Rackspace or Beyond Hosting (probably beyond hosting as their offer 25% discount for STM members). Besides this I read the AWS EC2 or Lambda might be a good solution


My requirements:

  1. It's need to be highly flexible. I need to able to scale up and down from one to day the other
  2. It's need to support a lot of traffic (I'm mainly running pop traffic)
  3. World wide delivery. I run campaigns from south east asia to south america to central europe..
  4. It can't be too expensive (tops €200 a month at the beginning).



So after reading a lot I've found a few solution's that might be able to help me out, but this still leaves me with a few questions:

  1. What is the difference between a VPS and a dedicated virtual server?
  2. If I stop using a CDN how will this affect my global delivery and loading speed?
  3. Will EC2 or Lambda be a solution?
    1. How does this compare in pricing to a dedicated virtual server?
    2. How complicated/technical is this to set up? I couldn't find any tutorial like for S3, Cloudfront and Route53 on STM and their FAQS are not enough for me to get any though how to set it up

  4. Is there any solution I'm overlooking?
  5. Is there a tutorial on STM that I've missed that can help me out?



As you might have already guessed by this post, I'm not tech savvy and have very little knowledge about hosting, servers etc. I do have some developer friends that can help me out, but only to a limited.


All help would be highly appreciated!!


Many thanks!


08-19-2017 09:33 PM #2 saitama (Member)

Let's see if i can give you some insights: i'm 46 and i've been a sysadmin in my previous years

Quote Originally Posted by annvirz View Post
I need a webhosting solution that supports PHP.


Right now I got my storage from S3, a DNS from route53 and a CDN from cloudfare, but this flow doesn't support PHP files which I need to root my root traffic to different landers based on certain conditions. As far as I understand there isn't a CDN that supports PHP files.
You got it right.
CDN is just a way to distribute the single requests coming from a single url (images, videos, css, js: basically anything which is not html).


I've been looking into a few solutions. First of all getting a dedicated virtual server from Rackspace or Beyond Hosting (probably beyond hosting as their offer 25% discount for STM members). Besides this I read the AWS EC2 or Lambda might be a good solution
Lamba is a complex beast: it offers in theory "serverless" execution but as far i know it does not support php natively, you have to use a wrapper written in node.js.
https://aws.amazon.com/blogs/compute...p-ruby-and-go/
I've never used it, i've just read some docs and every time i was perplexed.
Another limitation is that the lambda environment (AFAIK) has to be recreated each time, so for example you cannot have a persistent mysql database but you have to connect to the other services of Amazon called RBS in order to extract data.

EC2 is a "cloud server" handled by amazon.
I'll give you more details in the following paragraphs!


My requirements:

  1. It's need to be highly flexible. I need to able to scale up and down from one to day the other
  2. It's need to support a lot of traffic (I'm mainly running pop traffic)
  3. World wide delivery. I run campaingns from south east asia to south america to central europe..
  4. It can't be too expensive (tops €200 a month at the beginning).
Up to this point my best guess would be: you could probably split the "routing service" from the "delivery of content".


So after reading a lot I've found a few solution's that might be able to help me out, but this still leaves me with a few questions:

  1. What is the difference between a VPS and a dedicated virtual server?
  2. If I stop using a CDN how will this affect my global delivery and loading speed?
  3. Will EC2 or Lambda be a solution?
    1. How does this compare in pricing to a dedicated virtual server?
    2. How complicated/technical is this to set up? I couldn't find any tutorial like for S3, Cloudfront and Route53 on STM and their FAQS are not enough for me to get any though how to set it up

  4. Is there any solution I'm overlooking?
  5. Is there a tutorial on STM that I've missed that can help me out?

ok let's start adding details

1. VPS / dedicated / Cloud server.

A dedicated server is a physical computer. A Pc. You usually rent it from a provider (eg: like OVH) or you can buy your own hardware and rent the space from the datacenter of a provider (it's called co-location).
You (or a dedicated person) install the Operating system you want and tune it to your preference (mail? webserver? database service? php? Python?). At the end the machine will be linked to a public ip address and soon as you map a domain, if you haven't closed the vulnerabilities will be fucked over by script kiddies and malicious hackers.

A VPS is a "slice" of a physical computer. Using "virtualization systems" thanks to the modern CPUs it's possible to run several concurrent processes, which are in turn transformed into "separate virtual environment". Every VPS has it own slice of disk, ram, cpu power (aka cores). Everything is separated.
This kind of partitioning offers lower entry costs but also limited performances: the virtualization systems block automatically long-running processes or activities which may impact on the other environments.
Another big advantage is that the VPS, being all virtual, can be frozen, moved to another hardware and restarted, without losing data. It ain't possible for dedicated!

A cloud server (like EC2) is an evolution of a VPS. The cloud is stateless. You decide on the CPU power you need to use (called instance), decide how much disk (EBS) and which kind of speed (normal or SSD) it must have and the cloud assemble it from the hundred of thousands of machines available in a data center.



The moment you decide you need more power, you just create a new instance, freeze and clone the disk, match them, restart the instance and puff it's working again. (it's not really automagical and requires a bit of sysadmin mojo, but it can be done).


As you might have already guessed by this post, I'm not tech savvy and have very little knowledge about hosting, servers etc. I do have some developer friends that can help me out, but only to a limited.
Ok, my advice as said before would be to put a "routing" service on a VPS in order to test things and eventually move to a server on EC2 which you could upgrade as much as you need.

The workflow could be something like this:
1) routingdomain.xyz/lander1.php
2) PHP: Is the user from thailand?
3) PHP: YES, get from the database the url destination
4) PHP: Redirect 302 to maindomain.com/lander/thailand.html
5) maindomain.com/lander/thailand.html read the content from the CDN and doesn't need any server-side process.

this is just a guess, if you give me some example of the conditions i can be more accurate.

edit: since you're not practical with servers, my advice would be to use part of that server budget to hire a freelancer sysadmin on upwork.com! There are some real monster in eastern europe and with a skilled freelancer you can get some extra tuning which will be helpful in the long time.


08-19-2017 10:54 PM #3 cmdeal (Veteran Member)

Quote Originally Posted by saitama View Post
Let's see if i can give you some insights: i'm 46 and i've been a sysadmin in my previous years



You got it right.
CDN is just a way to distribute the single requests coming from a single url (images, videos, css, js: basically anything which is not html).



Lamba is a complex beast: it offers in theory "serverless" execution but as far i know it does not support php natively, you have to use a wrapper written in node.js.
https://aws.amazon.com/blogs/compute...p-ruby-and-go/
I've never used it, i've just read some docs and every time i was perplexed.
Another limitation is that the lambda environment (AFAIK) has to be recreated each time, so for example you cannot have a persistent mysql database but you have to connect to the other services of Amazon called RBS in order to extract data.

EC2 is a "cloud server" handled by amazon.
I'll give you more details in the following paragraphs!




Up to this point my best guess would be: you could probably split the "routing service" from the "delivery of content".



ok let's start adding details

1. VPS / dedicated / Cloud server.

A dedicated server is a physical computer. A Pc. You usually rent it from a provider (eg: like OVH) or you can buy your own hardware and rent the space from the datacenter of a provider (it's called co-location).
You (or a dedicated person) install the Operating system you want and tune it to your preference (mail? webserver? database service? php? Python?). At the end the machine will be linked to a public ip address and soon as you map a domain, if you haven't closed the vulnerabilities will be fucked over by script kiddies and malicious hackers.

A VPS is a "slice" of a physical computer. Using "virtualization systems" thanks to the modern CPUs it's possible to run several concurrent processes, which are in turn transformed into "separate virtual environment". Every VPS has it own slice of disk, ram, cpu power (aka cores). Everything is separated.
This kind of partitioning offers lower entry costs but also limited performances: the virtualization systems block automatically long-running processes or activities which may impact on the other environments.
Another big advantage is that the VPS, being all virtual, can be frozen, moved to another hardware and restarted, without losing data. It ain't possible for dedicated!

A cloud server (like EC2) is an evolution of a VPS. The cloud is stateless. You decide on the CPU power you need to use (called instance), decide how much disk (EBS) and which kind of speed (normal or SSD) it must have and the cloud assemble it from the hundred of thousands of machines available in a data center.



The moment you decide you need more power, you just create a new instance, freeze and clone the disk, match them, restart the instance and puff it's working again. (it's not really automagical and requires a bit of sysadmin mojo, but it can be done).




Ok, my advice as said before would be to put a "routing" service on a VPS in order to test things and eventually move to a server on EC2 which you could upgrade as much as you need.

The workflow could be something like this:
1) routingdomain.xyz/lander1.php
2) PHP: Is the user from thailand?
3) PHP: YES, get from the database the url destination
4) PHP: Redirect 302 to maindomain.com/lander/thailand.html
5) maindomain.com/lander/thailand.html read the content from the CDN and doesn't need any server-side process.

this is just a guess, if you give me some example of the conditions i can be more accurate.

edit: since you're not practical with servers, my advice would be to use part of that server budget to hire a freelancer sysadmin on upwork.com! There are some real monster in eastern europe and with a skilled freelancer you can get some extra tuning which will be helpful in the long time.
Good stuff!


08-21-2017 09:19 AM #4 annvirz (Member)

Hi Saitama,

First of all thanks a lot for your elaborated answer! Really appreciated it! It’s a bit clear to me, but to be honest I’m still a bit lost.
So, I will follow your advice (as I was already planning to start with a VPS). I was thinking about Beyond Hosting (https://beyondhosting.net/cloud-serv...irtual-servers) as they give a 25% discount to STM members.

After I have this working and my campaigns are successful (and traffic is increasing) I will look into migrating to EC2 with the help of a system admin on upwork. For now I’m looking for a more simple and faster solution (fast as in I can deploy it quickly and continue with my campaigns)
So, a few follow up questions:

  1. Is the VPS from Beyond Hosting a fit for more? And is it fair pricing? I’ve talked to an IT friend and he says this is too much for me and that there should be solutions for like €30 a month. On STM and from some affiliate friends I’ve talked to they mainy mention Beyond Hosting (or VPS for similar pricing)
  2. Is there an easy way I can calculate how much GB memory, vCPU, SSD storage I need?
  3. Is this VPS integratable with AWS S3 and Route53?
  4. Is this doable with just the support of Beyond Hosting and some research? Or do I need a system admin for this as well?


The workflow you’ve described is correct more or less. Instead of country it could depend on the carrier or ISP for example, but in general that’s the flow I have in mind. Do I understand it correctly had I would still need the CDN in combination with the VPS? And first the PHP file is loaded from the PHP and from their redirected to the CDN based on the conditions?

Thanks again and looking forward to your reply!


08-21-2017 10:39 AM #5 johnnyx (Member)

Is a VPS is a lot safer then a dedicated server?


08-21-2017 10:58 AM #6 nickpeplow (AMC Alumnus)

cloudways


08-21-2017 11:55 AM #7 caurmen (Administrator)

First question: have you looked at FunnelFlux? It's billed as a "visual funnel creator", and is pretty much designed to, as you say,

root my root traffic to different landers based on certain conditions
They can also offer you hosting advice.

Other tracker software can also do the same job, but my preference if you're building complex funnels would definitely be FunnelFlux.

Oh, also - you don't need to abandon your CDN. You just need a server that does your routing. FunnelFlux is an example of such software, but you can also have someone write you custom software if you need it.

If you need to scale up and down, a VPS is the way to go.

The chances are you won't need to be able to scale to the extent that EC2 would let you, though, unless you're doing some really compute or data-intensive stuff. Nothing in the normal run of AM would fit in that category. If you're custom-pathtracing images for every single visitor, for example, then that's a different matter. But it sounds like what you're doing is just a series of conditional statements.

OK, specific questions:

1. Is the VPS from Beyond Hosting a fit for more? And is it fair pricing? I’ve talked to an IT friend and he says this is too much for me and that there should be solutions for like €30 a month. On STM and from some affiliate friends I’ve talked to they mainy mention Beyond Hosting (or VPS for similar pricing)
Most of the cost of the Beyond Hosting VPS is because it's a managed server - in other words, they do sysadmin stuff for you, rather than you having to do it yourself.

If you're comfortable with Linux administration or happy to hire someone who is, you can get an unmanaged server for much cheaper - I use Digital Ocean usually, but Linode or Vultr are also solid options. But then you're going to have to do all the management yourself.

Is there an easy way I can calculate how much GB memory, vCPU, SSD storage I need?
For what you're describing, unless you're talking about ridiculously huge amounts of traffic (more than 2 million visitors an hour), an 8Gb VPS will comfortably handle everything you need. CPU-wise you don't really need to worry: conditional statements are usually not very CPU-intensive. SSD - you'll need enough to hold the program you're running. If it's a custom routing solution, that'll be about 100kb. If it's something like FunnelFlux, their support will give you recommendations.

Is this VPS integratable with AWS S3 and Route53?
Yep. You don't need to abandon a CDN for this, either: just use a program to route your visitors to whichever page you want, then host those pages on a CDN.

Is this doable with just the support of Beyond Hosting and some research? Or do I need a system admin for this as well?
If you use something like FunnelFlux or another tracker, you should be able to get things set up on your own. If you decide you need a custom routing system, you'll either need to learn to program (assuming you can't do that already) or hire a programmer.

If you want to share more specific details of the conditional routing you want to do, I can probably advise you more.

Hope that helps!


08-21-2017 12:57 PM #8 saitama (Member)

Quote Originally Posted by johnnyx View Post
Is a VPS is a lot safer then a dedicated server?
it depends on the management.

- managed services usually have a sysadmin checking things and patching major holes. Therefore they cost more.
- unmanaged services (most dedicated servers are unmanaged) have to be installed and patched by you (or by somebody you pay).

In general dedicated servers can squeeze every clock cycle from a CPU without any issue, but you should have at least a Disk in RAID-1 (mirroring) so if a disk die, the server company have just to replace the disk and the server would restart with minimal or no downtime.

If the power supply fail or the motheboard fail, the downtime maybe be longer.

A virtual machine is just data, it can be restored from a backup.

major warning: don't forget to backup server data!


08-21-2017 01:27 PM #9 saitama (Member)

I'd say Caurmen has already answered most questions


the idea of using a third party service is also clever since you're not programming the routing yourself.

Keep in mind that Apache should have a default maximum value of 256 concurrent clients which could serve (aka: accepting a request and giving them an aswer).
All the connection beyond those 256 are either queued or refused!

How many connections are 256 concurrent connections?

- 1.000.000 requests /day (people or bot opening your url) or
- 41.666 requests / hour or
- 649 requests / minute
- 11 requests / second

it may takes a lot to reach the maxclient limit, you may reach the ram limits before that level, but that's only theory because as far as i can say from my short experience, pop traffic can generate spikes of traffic which put strains on the servers.


https://devcenter.heroku.com/articles/php-concurrency



As @caurmen said it would be better to focus on creating the funnels instead of worrying about php concurrency


08-21-2017 02:51 PM #10 BeyondHosting-Tyler (Member)

Quote Originally Posted by caurmen View Post
First question: have you looked at FunnelFlux? It's billed as a "visual funnel creator", and is pretty much designed to, as you say,



They can also offer you hosting advice.

Other tracker software can also do the same job, but my preference if you're building complex funnels would definitely be FunnelFlux.

Oh, also - you don't need to abandon your CDN. You just need a server that does your routing. FunnelFlux is an example of such software, but you can also have someone write you custom software if you need it.

If you need to scale up and down, a VPS is the way to go.

The chances are you won't need to be able to scale to the extent that EC2 would let you, though, unless you're doing some really compute or data-intensive stuff. Nothing in the normal run of AM would fit in that category. If you're custom-pathtracing images for every single visitor, for example, then that's a different matter. But it sounds like what you're doing is just a series of conditional statements.

OK, specific questions:



Most of the cost of the Beyond Hosting VPS is because it's a managed server - in other words, they do sysadmin stuff for you, rather than you having to do it yourself.

If you're comfortable with Linux administration or happy to hire someone who is, you can get an unmanaged server for much cheaper - I use Digital Ocean usually, but Linode or Vultr are also solid options. But then you're going to have to do all the management yourself.



For what you're describing, unless you're talking about ridiculously huge amounts of traffic (more than 2 million visitors an hour), an 8Gb VPS will comfortably handle everything you need. CPU-wise you don't really need to worry: conditional statements are usually not very CPU-intensive. SSD - you'll need enough to hold the program you're running. If it's a custom routing solution, that'll be about 100kb. If it's something like FunnelFlux, their support will give you recommendations.



Yep. You don't need to abandon a CDN for this, either: just use a program to route your visitors to whichever page you want, then host those pages on a CDN.



If you use something like FunnelFlux or another tracker, you should be able to get things set up on your own. If you decide you need a custom routing system, you'll either need to learn to program (assuming you can't do that already) or hire a programmer.

If you want to share more specific details of the conditional routing you want to do, I can probably advise you more.

Hope that helps!
You can now buy servers from us with "Basic" management and our pricing is reasonable comparable to other cloud providers. Our uptime and system reliability is vastly better due to our highly available architecture.

Digital Ocean/AWS/Vultr ect all stack vms onto local storage and if the hypervisor has a problem, your offline until its fixed. RIP!


08-21-2017 03:41 PM #11 ThrvTrkr (Member)

I would like to insert Thrivetracker into this conversation.

Like FunnelFlux, we have a self-hosted software that can be handled and managed by a user.
Like Voluum, we have a cloud-based software, handled and managed by our staff.

ThriveTracker offers the most flexible tracking platform in the industry, able to scale to amazing click totals. Our pricing structure is centered around total campaign clicks in a month, because our infrastructure is built to auto-scale up and down based upon how high or low the traffic flow is to the system. We offer our infrastructure on the AWS cloud, with zero latency and employing their Elastic Load-Balancing feature, allowing for the platform to spread it's needs around hundreds of click-tracking servers all around the world.

We offer the fastest redirect speeds world-wide.

PHP is not an issue for us at all.

If you would like to chat more about this, or look at our platform demo, feel free to message me directly and I'd be happy to help.

Cheers,


08-21-2017 04:12 PM #12 annvirz (Member)

@caurmen: Thanks for your answers.
To come back to specifics on the conditional rooting:
I’m using Voluum as a tracker. I’ve set up a few conditions through Voluum as well, but I’m also working with a third-party tool where I can set the conditions and that also hides my real landers from tools like Adplexity. I set generates a PHP file that I just have to upload on the server.

So I’ve already figured out how to do the custom rooting. I just need to find a way to host my website in a way that they support PHP.
I think I will try to hire a freelance system admin to set this up for me with either one of the parties you provided or cloudways.


08-24-2017 10:04 PM #13 annvirz (Member)

Hi guys,

Just wanted to let you know that I've found a solution for my problem.

So as a cheap solution I hired a system admin from Upwork who set up my hosting infrastructure with Digital Ocean for just $40,00 a month. It just took him a few hours to set up it and even gave me a training for $75 and I was online in one morning.

And thanks again saitama. You saved me a lot of money


08-25-2017 09:55 AM #14 caurmen (Administrator)

Glad it worked out!


08-25-2017 03:26 PM #15 saitama (Member)

Quote Originally Posted by annvirz View Post
Hi guys,

Just wanted to let you know that I've found a solution for my problem.

So as a cheap solution I hired a system admin from Upwork who set up my hosting infrastructure with Digital Ocean for just $40,00 a month. It just took him a few hours to set up it and even gave me a training for $75 and I was online in one morning.

And thanks again saitama. You saved me a lot of money
Glad to be of help!


01-02-2018 10:08 PM #16 BeyondHosting-Tyler (Member)

Quote Originally Posted by saitama View Post
it depends on the management.

- managed services usually have a sysadmin checking things and patching major holes. Therefore they cost more.
- unmanaged services (most dedicated servers are unmanaged) have to be installed and patched by you (or by somebody you pay).

In general dedicated servers can squeeze every clock cycle from a CPU without any issue, but you should have at least a Disk in RAID-1 (mirroring) so if a disk die, the server company have just to replace the disk and the server would restart with minimal or no downtime.

If the power supply fail or the motheboard fail, the downtime maybe be longer.

A virtual machine is just data, it can be restored from a backup.

major warning: don't forget to backup server data!
You pay a huge premium for "current gen" dedicated now days. Almost all the good CPUs are used for shared resource hosting, but a properly setup server using a thicker type of virtualization like KVM/VMWare will get you the same performance and sometimes even better than bare metal because of IO cache.


Home > Programming, Servers & Scripts > Hosting, Servers & Security