Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Best way to host a small site on Ramnode 128mb VPS
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Best way to host a small site on Ramnode 128mb VPS

xaitmixaitmi Member
edited October 2015 in Help

Hi.

I have a website that gets small amounts of traffic (100 unique visitors / 24 hours).

It's like 5 pages, was originally all HTML but I switched it over to php so I can just use the include function for header.php and footer.php in every page.

What would be the best solution to host this on a ramnode 128mb ram vps.

Nginx?

I need PHP and I plan on adding mysql later.

Thanked by 1Nick_A

Comments

  • Of course Nginx with PHP-FPM and if you plan to use MySQL later add MariaDB :) .

  • I'm not familiar with nginx, but last time I checked the default Ubuntu install comes with apache2. I just added PHP via apt-get and that was it.

  • Do you have any rewrites in place?

  • There's no need to overthink it. If all you're using PHP for is simple templates, you can skip it and just use server-side includes (Apache or otherwise), or adopt a RAGtag approach like I did, and ditch all the extra fluff and dependencies on mods of more questionable security.

    If you do actually need PHP and/or MySQL, you can walk it in piecewise. For example, I also use that same 128MB site to host some Perl and Ruby templates, but I get by with just a SQLite database. How you make the best use of the limited resources available depends a great deal on how much you want to play with the different options available, or if you think your time is better spent on other things.

    Thanked by 1Alt
  • raindog308raindog308 Administrator, Veteran

    If you're just using php for footer/header, better to write a script to regenerate your site (i.e., you edit a template file and then run a script to create .html and place it in the web dir). Serving purely static files is faster than php.

    nginx is going to scale better and take less resources, particularly for static web pages, than apache. I'd use nginx.

  • @raindog308 said:
    If you're just using php for footer/header, better to write a script to regenerate your site (i.e., you edit a template file and then run a script to create .html and place it in the web dir). Serving purely static files is faster than php.

    nginx is going to scale better and take less resources, particularly for static web pages, than apache. I'd use nginx.

    If there is no rewrites, I would use Octopress to generate pages and serve it using Monkey server. It would run on a home router for 100 vistors/day.

  • raindog308raindog308 Administrator, Veteran

    There are many static site generators. Gives you all the flexibility of the templating and then the performance of being purely static.

    Thanked by 1smallet
  • rm_rm_ IPv6 Advocate, Veteran
    edited October 2015

    raindog308 said: Serving purely static files is faster than php.

    Yeah and you would really notice the difference if you hosted on a 486, so this is important, as you never know and maybe you will in the future.

    EkaatyLinux said: Octopress

    I mean seriously, five pages with two includes in each, and you already start advising bizarre shit nobody has ever heard of, because FASTER? Like totally on a Xeon CPU VPS the PHP will grind to a halt including two files for 100 unique visitors in 24 hours?

    As for the general advice, go with Lighttpd. It's like nginx, but better (saner and easier to configure).

  • @rm_ said:
    I mean seriously, five pages with two includes in each, and you already start advising bizarre shit nobody has ever heard of, because FASTER? Like totally on a Xeon CPU VPS the PHP will grind to a halt including two files for 100 unique visitors in 24 hours?

    Octopress is pretty known as far as I know. It's based on Jekyll, the static site generator used at GitHub pages. Monkey Server is pretty new, I know, but is as very good web server for low memory environments. OP asked for opinions, so, I don't see why I shouldn't give mine.

    And, as you can read on my post, I'm not advising "bizarre shit" because FASTER, but because this can run on restrained env. like a home router for a site like what OP has described.

    Well, I've posted a script to install Monkey Server here: http://www.lowendtalk.com/discussion/comment/846721/

    If you want to know why I advise Monkey you can look at this comment: http://www.lowendtalk.com/discussion/comment/845893/#Comment_845893

  • GeekoineGeekoine Member
    edited October 2015

    Jekyll and Nginx!

  • AltAlt Member

    I agree with @impossiblystupid: if you're using PHP only to include header/footer, you can just use Server Side Includes.
    For low ressources, I recommend you check nginx and it's SSI module: http://nginx.org/en/docs/http/ngx_http_ssi_module.html

    If later you want to use PHP for others more dynamic stuff, you can also cache pages with nginx.

  • using centmin to host my wp blog

  • DBADBA Member

    One option would be lighttpd, sqlite and PHP.

  • i thought centminmod had a very high requirement... like 512mb

  • @belinik said:
    i thought centminmod had a very high requirement... like 512mb

    yeah i thought so too. wonder where i get that (mis)conception.

  • @belinik said:
    i thought centminmod had a very high requirement... like 512mb

    You can edit the script to allow instalations on servers with lower memory than that. It will install without problems, but you'll need to tweak MariaDB and PHP-FPM after installation to prevent oom.

  • eva2000eva2000 Veteran
    edited October 2015

    belinik said: i thought centminmod had a very high requirement... like 512mb

    like @EkattyLinux stated you can edit Centmin Mod's preset low mem threshold as outlined on my 128MB VPS Wordpress Centmin Mod LEMP blog at https://blog.centminmod.com/1 or via Getting Started Guide step 4 at http://centminmod.com/getstarted.html

    With 128MB low memory VPS, there's a minor Centmin Mod tweak needed prior to actual install of Centmin Mod. Prior to actual Centmin Mod install (via centmin.sh menu option #1), find and edit inc/memcheck.inc and find ISLOWMEM variable and change it's value from 262144 KB to 131072 KB. Then run centmin.sh and select menu option #1. It is still recommended for best performance to have a minimum 256MB of memory, but at least with this updated change you can suffice with a 128MB Low End Box VPS.

    Make sure you only do this on CentOS 6 32bit as 64bit or CentOS 7 64bit memory requirements wont work well with 128MB for full Centmin Mod LEMP stack.

    I have no problems with CentOS 6 32bit + Centmin Mod with ISLOWMEM variable tweak and 128MB VPSes, you'd probably want at least 64MB swap availability at that low memory though. I run my WP blog https://blog.centminmod.com/ on 128MB VPS and also run a few standby DNS failover fail-whale backup notice VPSes for sites.

    FAQ 36 has been added for this http://centminmod.com/faq.html

    Thanked by 1afterSt0rm
Sign In or Register to comment.