I hired a sysadmin to set up a VPS server for me and, unfortunately, it looks like things were not set up correctly. When trying to install and update plugins, I run into permissions errors all the time. WP Super Cache is the main issue as it causing my readers to run into 502 errors. Currently, my site does not load pagination (no Page 2, Page 3, etc..).

12/1 Update: The apache server has restarted itself multiple times today and in the past 3 hours since my request to the host provider, all I’ve got so far is that they are monitoring it. And it has restarted since they began monitoring too…

The sysadmin that set up the server mentioned that in order for it to work properly under DSO mode, wp-admin, wp-content and wp-plugins folders would need to be changed to 777 permissions. The only problem is that I still couldn’t get a 3.0.2 upgrade to work under those settings today (504 timeout nginx error this time) so I’m still concerned about running it that way for many reasons.

I’ve been told that if I run under PHP mode though (think that’s right?), that I will hog up more RAM with queries, etc and I’m already at 60% usage in DSO mode. This doesn’t make any sense to me because my blog ran a little slow but still ok without any downtime on shared hosting. I’m now on a very reputable VPS w/ 512MB ram and my site only gets 10-12k pageviews a day.

The host said that they have tweaked the config to optimize ram so I don’t think anything is set incorrectly. Still trying to figure out what is going on here.

Developing…..

4 Answers
4

It’s a very loaded question, I’ll try my best here, keep in mind it’s 4am, so I’m just giving you highlights, not detailed explanations.

Linux I’m assuming you’re using a recent version of Ubuntu

  1. Change the default SSH port from 22, to something else (/etc/ssh/sshd_config).
  2. Either enable AllowGroups or AllowUser in the sshd_config,
  3. Install fail2ban (apt-get install fail2ban)
  4. Install apache2, php5, and mysql-server
  5. Edit /etc/apache2/conf.d/security.conf and make appropriate changes for a production server.
  6. Disable the slow query log in MySQL (you don’t want this on in production, especially on a VPS)
  7. Configure your system timezone (dpkg-reconfigure tzdata)
  8. Make sure your php.ini reflects the same time zone
  9. Add a new virtualhost in /etc/apache2/sites-available/ (leave the default one alone)
    1. Enable this virtual host by: a2ensite nameofnewvhostfile
    2. Enable mod-rewrite (a2enmod rewrite)
    3. Restart apache2 /etc/init.d/apache2 restart

You can do some other things as well, like install Shorewall, or UFW for better firewall management, install Nginx as a reverse proxy to apache, tweaking the query cache, but this really depends on a whole bunch of other things, and you should tweak mysql settings after being in production mode for a few days.

Leave a Reply

Your email address will not be published. Required fields are marked *