It looks like you're new here. If you want to get involved, click one of these buttons!
I have a teamspeak server currently on my 128mb buyvm box and am wanting to put a small php site on it as well for a faction forum, i have around 64mb to play with. Anyone know of a tutorial out there? I can only find them for debian 5 and am unsure if those would really still apply or not. Sorry in advance if this sounds a little lame.
Comments
Just use the leb script on lowendbox.com runs at ~25 mb ram here
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksIf the PHP site doesn't require MySQL, it's a lot easier.
vpsBoard.com - Come talk about virtual servers and stuff. IRC.FREENODE.NET #vpsBoard Now with a 'Thanks' Button. =]
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanksapt-get install nginx php-fpm sqlite3/me runs two moinmoin-based wikis on inceptionhosting's 64MB Xen.
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanksagree @breton, grab yourself fluxbb if you want to run under 64mb
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@joodle I will go check that out.
@MannDude Sadly it will need MySQL or brenton's sqlite idea
@brenton @Nexus have not even heard of fluxbb, I will check that out too
Thank you all for the advice =)
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@pyropyro78, I am not affiliated with them at all, but check them out here, it's very lightweight and you can actually get this forum up with nginx and sql/etc with 35-40mb ram, Right in your alley :) Good luck!
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanksfrom the VPS running freevps.us (MyBB forum):
[root@italy2 ~]# free -m total used free shared buffers cached Mem: 243 139 104 0 7 84 -/+ buffers/cache: 47 195 Swap: 1023 0 102347mb ram used excluding buffers/caches.
MySQL, PHP-FPM (with APC), nginx
FreeVPS.us - The oldest post to host VPS provider
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@Nexus @dmmcintyre3 I will go with MyBB. Though I am new to nginx, i am normally an apache person. I have got the site working except for when anyone wants to use www. in front of the domain name, it does forward to the nginx server though. any ideas?
I am just assuming it is in my /etc/nginx/sites-enabled file
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksWell, under server I would just add this:
if ($host ~* ^www\.(.*)) { set $remove_www $1; rewrite ^(.*)$ http://$remove_www$1 permanent; }If I understand you correctly? This will just forward it and remove the www.
(Not sure if vanilla ate my code format)
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@Nexus That seemed to work =) thank you thank you. Now to start work on the site itself.
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@pyropyro78 np, hopefully that gets you going
- Spam
- Abuse
- Troll
0 • Disagree Agree Thankshttp://wiki.nginx.org/IfIsEvil
A correct CNAME in the DNS for the www and
in the config file should work
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksFor what it's worth, rewrite is one of the very few statements that it's perfectly safe to use inside if.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksI know, but I'm using my solution and it works for me so there should be no need for an if-statement at all. I was just trying to say that you should avoid every 'if' unless you tried every other solution to no avail.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksTo avoid the performance hit of the if, nginx pitfalls recommends:
server { server_name www.domain.com; return 301 $scheme://domain.com$request_uri; } server { server_name domain.com; [...] }- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksI usually just use server_name .mydomain.com, it covers non-www, www, and I think all other subdomains
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksBut it leaves you scatterred all over search engines with competing www and non-www results.
@patrokov has the right approach.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksUse, minstall it'll get you down to 11 MB at idle on OpenVZ. You can also use my minAdmin script for managing the site. Most of the questions you ask here are implemented in minAdmin.
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanksany minimal script using lighttpd and php-fpm? it seems not many tutorials use lighttpd with php-fpm, why? they don't get along very well? or too hard to config?
- Spam
- Abuse
- Troll
0 • Disagree Agree Thankseating many memory
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksThis is my configuration, not sure good or not.
server { listen 8080; server_name www.domain.com; rewrite ^ http://domain.com$request_uri?; } server { listen 8080; server_name domain.com; location / { root /usr/share/nginx/domain.com/public; index index.php; } }ps: Varnish as front end.
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@budingyun, hehe.. I use varnish with Minstall, now it seems like my site is faster than before
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksI'm just using varnish and without any caching plugin. Already fast enough. :D
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksWhich one do you refer to? lighttpd or php-fpm or the combination?
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksWhan I'm using Lighttpd + fastcgi, it uses more memory, but my site load faster. In Nginx I use php-fpm, and also it load fast. If it's a busy site, maybe adding more active server would be nice. But if it's a low memory box, less server would be great.
If you use lighttpd + php-fpm, will your site load faster?
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanksdunno...actually I never tried that combination...because most tutorials in my search result use lighpttpd with fastcgi...so I just follow them with that setup...but I got the impression (maybe wrong) that php-fpm is better/faster than factcgi and seems most nginx tutorials adopt php-fpm...so I just wonder why? lighttptd does not get along well with php-fpm?
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks@budingyun If you're trying to squeeze every last ounce of performance out of your box, you should use return instead of rewrite unless you actually need the increased functionality rewrite. Return uses variable names, whereas rewrite uses regex expressions. The nginx documentation is rather sparse on how much difference there is, and I haven't found any benchmarks, but theoretically there's a difference.
Also, if there's ever a chance that you might use ssl, instead of http:// you should use $scheme.
Your document root should be in the server block, not the location block. That way, if you add new location blocks they are relative and if you'll never end up with a page doesn't exist, because you left a location without a root.
If your http block has an index section you don't need to repeat index in your server block, let alone the location block.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksThanks for the info, it look like i need to study nginx documentation more. (>_<) My current config i just follow from default.conf, but after i follow your instruction like your post above, seems redirection from www.domain.com to domain.com much faster now. :D
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksAnd one last caution (not specific to nginx), if you think there's ever a chance that you might want to reverse your www.domain.com and domain.com, don't use 301 redirects, because anyone who's ever visited your site will get an error, because their browser takes "permanent" redirects quite literally. They have to clear cache to get it to work.
- Spam
- Abuse
- Troll
0 • Disagree Agree ThanksLowendscript from the LEB site works fine on Debian 6.
http://www.lowendbox.com/blog/yes-you-can-run-18-static-sites-on-a-64mb-link-1-vps/
- Spam
- Abuse
- Troll
0 • Disagree Agree Thanks