![]() Here are some details on how I moved my WordPress blog from shared hosting to VPS and made it really fast with Nginx, PHP APC, and Super Cache.Īt first thought, I wanted to play around with Go Lang so I followed the instructions for a simple server setup on Ubuntu and a tutorial on running Nginx as a reverse proxy for Go. They also have great documentation, API, and an easy to use control panel. No wonder they are doing so well, it makes sense to just try them out. You can setup a droplet in 1 minute and you can pay month to month. DigitalOcean plans start at 5 dollars and you get 1 Core with 512MB Memory, 20GB SSD Disk, and 1TB of Transfer. Performance was not really a problem as WordPress caching plugins do a good job but I wanted more control of the stack and VPS pricing is not that far off from shared hosting. Make sure the option -enable-fpm is defined in php_source_configure_command.It was time to pay the yearly fee for shared hosting and I decided to check out some VPS options. ![]() Nginx: If you're using Nginx as a webserver for PHP, you will need to compile PHP with FPM.by installing apache2-mpm-event and libapache2-mod-fastcgi) and the mpm_event module is loaded. You'll also need to make sure Apache's support for CGI and event is installed (e.g. Make sure the option -enable-fpm is defined in php_source_configure_command. Apache with mpm_event or mpm_worker: If you're using Apache with event or worker as a webserver for PHP, you will need to compile PHP with FPM.Finally, you will need to make sure the mpm_prefork module is loaded instead of mpm_worker or mpm_event, and likely add a nf (where X is the major version of PHP) configuration file to the Apache module config folder with contents like nf. by installing apache2-prefork-dev in Ubuntu), and you will need to make sure the option -with-apxs2 is defined in php_source_configure_command. Apache with mpm_prefork: If you're using Apache with prefork as a webserver for PHP, you will need to make sure apxs2 is available on your system (e.g.Using a folded scalar ( >) allows you to define the variable over multiple lines, which is extremely helpful for legibility and source control!Ī few other notes/caveats for specific configurations: Add in all the options you need for your particular environment. configure command that will build the Makefile to be used for PHP compilation. Note that source compilation takes much longer than installing from packages (PHP HEAD takes 5+ minutes to compile on a modern quad-core computer, just as a point of reference). In these cases, you may choose to install PHP from source by compiling it directly. master) version of PHP, there's a good chance there's no suitable package already available in your platform's package manager. If you need a specific version of PHP, or would like to test the latest (e.g. On Debian/Ubuntu systems: Make sure php-apcu is in the list of php_packages. ![]() On RHEL/CentOS systems: Make sure php-pecl-apcu is in the list of php_packages.If you use APC, you will need to make sure APC is installed (it is installed by default, but if you customize the php_packages list, you need to include APC in the list): ![]() Generally the default should work, but in some cases, you may need to override the filename. The platform-specific APC configuration filename. The OpCache is included in PHP starting in version 5.5, and the following variables will only take effect if the version of PHP you have installed is 5.5 or greater. Only used if php_use_managed_ini is set to true. Php_error_reporting: "E_ALL & ~E_DEPRECATED & ~E_STRICT" Php_sendmail_path: "/usr/sbin/sendmail -t -i" Php_fpm_pool_group: "" # default varies by OS Php_fpm_pool_user: "" # default varies by OS ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |