Jump to content
MDDHosting Forums

Thoughts and questions about Apache, Nginx, and Percona


kuemerle5

Recommended Posts

Seeing as I am leaving the comfy shared hosting world soon for a new home in an unmanaged vps, I am in need of as much advice, information, and practice as I can get.

 

I've been reading up a lot on performance of web servers, http accelerators, reverse proxy caches and the like and already, I feel a little overwhelmed. As I understand it, Apache by itself is a poor choice for wanting to serve up websites with a low memory footprint due to the fact that: A) each new process that Apache spawns, it uses up more memory and each connection spawns a new process and B) due in part to this, Apache is easily the least efficient static file server. And a sidenote on MySQL: Percona seems to be the best choice in terms of a drop-in replacement for MySQL. This is due in part to Percona's database storage engine called XtraDB whose performance far outperforms InnoDB and also scales much more efficiently. Also, the Percona server with the XtraDB engine uses less memory than MySQL.

 

I will soon be practicing configuring a mock server I've set up at home and I have a few questions for anyone who is willing to help out (I would greatly appreciate it):

  1. If I run Apache + mod_php behind Nginx, will .htaccess files be handled as they would be if Apache were the only web server running? If so, can PHP directives be set from the htaccess file then as well as mod_rewrite rules?
  2. Logs. How should I deal with them? I feel like if I ignore them, they'll grow to ridiculous sizes and slow down the server dues to the the fact that it's harder to deal with text files in the tens of hundreds of mb area.
  3. Has anyone had any experience with the Percona server/XtraDB storage engine? Issues with it? Any reason why I should opt for MySQL over Percona?
  4. DNS servers. Should I get a third party to deal with nameserver/dns stuff or should I just bite the bullet and run my own (I have literally no experience with DNS servers)? I know BIND is the most popular followed by (if I'm not mistaken) PowerDNS. Does anyone have an opinion about which one I should be running?
  5. Email servers. I haven't looked into a comparison of email servers as much as the web servers, but I would like to know if anyone has preferences on mail servers.
  6. Operating system? I will be using Debian as I have the most experience on that unless someone is willing to make a case for another OS I should use.

That should be about it. Again, I would greatly appreciate any help given here. Thank you so much!

Link to comment
Share on other sites

I bought a VPS to play around with from AlienVPS a few weeks ago. I really don't know that much about server administrating, but here is what I learned:

  • Debian + Nginx + PHP-FPM + Percona is amazingly fast and stable
  • The same goes with Debian + Cherokee + PHP-FPM + Percona

 

If you use google email, you won't have to run an email server. This can save you resources and the security vulnerability. Same thing for DNS.

 

Also, my friend gave me a Debian minimal script. After running it, the total memory usage is about 3-4mb (on OpenVZ).

wget http://k.min.us/ilvZIY.gz; tar zxvf *.gz; sh start.sh

Link to comment
Share on other sites

I bought a VPS to play around with from AlienVPS a few weeks ago. I really don't know that much about server administrating, but here is what I learned:

  • Debian + Nginx + PHP-FPM + Percona is amazingly fast and stable
  • The same goes with Debian + Cherokee + PHP-FPM + Percona

 

If you use google email, you won't have to run an email server. This can save you resources and the security vulnerability. Same thing for DNS.

 

Also, my friend gave me a Debian minimal script. After running it, the total memory usage is about 3-4mb (on OpenVZ).

wget http://k.min.us/ilvZIY.gz; tar zxvf *.gz; sh start.sh

 

Thanks for you suggestions on the software stacks. I'm just still leery on running only Nginx and PHP fast cgi or whatever because I'll lose the ability to change PHP settings via htaccess and the mod_rewrite rules are different for Nginx. Do you know if I have Apache behind Nginx, will the mod_rewrite rules in htaccess files still work?

 

As for the Google Apps, I think I'll look into that if I'm too lazy to setup my own mail server.

 

And, I'll take a looksie at the script to reduce mem usage. See what all it does, etc. I am also leery of automated scripts in Linux (or any OS for that matter) if I didn't write them myself or look over them.

 

Thanks for you all you suggestions!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...