From d77c6514b444b9a190e0561728da3635b6c522bf Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 3 Sep 2019 15:58:18 +1200 Subject: [PATCH] DOCS Remove Nginx/HHVM guide HHVM isn't supported any more, PHP 7 is where it's at --- .../How_To/Setup_Nginx_and_HHVM.md | 87 ------------------- 1 file changed, 87 deletions(-) delete mode 100644 docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md diff --git a/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md b/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md deleted file mode 100644 index c2a09e022..000000000 --- a/docs/en/00_Getting_Started/01_Installation/How_To/Setup_Nginx_and_HHVM.md +++ /dev/null @@ -1,87 +0,0 @@ -title: Nginx and HHVM -summary: Setting up Nginx and HHVM on Debian/Ubuntu using packages. - -# Nginx and HHVM - -[HHVM](http://hhvm.com/) is a faster alternative to PHP, in that it runs in a virtual machine -and uses just-in-time (JIT) compilation to achieve better performance over standard PHP. - -Installation on Debian or Ubuntu is relatively straightforward, in that HHVM already provide -packages available to use. - -Install apt sources on Debian 7 (wheezy): - - wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add - - echo deb http://dl.hhvm.com/debian wheezy main | sudo tee /etc/apt/sources.list.d/hhvm.list - -Install apt sources on Ubuntu 14.04 (trusty): - - wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add - - echo deb http://dl.hhvm.com/ubuntu trusty main | sudo tee /etc/apt/sources.list.d/hhvm.list - -Now install the required packages: - - sudo apt-get update - sudo apt-get install hhvm libgmp-dev libmemcached-dev - -Start HHVM automatically on boot: - - sudo update-rc.d hhvm defaults - -Please see [Prebuilt Packages for HHVM on HHVM wiki](https://github.com/facebook/hhvm/wiki/Prebuilt%20Packages%20for%20HHVM) for more -installation options. - -Assuming you already have nginx installed, you can then run a script to enable support for -nginx and/or apache2 depending on whether they are installed or not: - - sudo /usr/share/hhvm/install_fastcgi.sh - -For nginx, this will place a file at `/etc/nginx/hhvm.conf` which you can use to include in -your nginx server definitions to provide support for PHP requests. - -In order to get SilverStripe working, you need to add some custom nginx configuration. - -Create `/etc/nginx/silverstripe.conf` and add this configuration: - - fastcgi_buffer_size 32k; - fastcgi_busy_buffers_size 64k; - fastcgi_buffers 4 32k; - - location / { - try_files $uri /index.php?$query_string; - } - - error_page 404 /assets/error-404.html; - error_page 500 /assets/error-500.html; - - location ^~ /assets/ { - try_files $uri =404; - } - location ~ /\.. { - deny all; - } - location ~ web\.config$ { - deny all; - } - -The above script passes all non-static file requests to `/index.php` in the webroot which relies on -`hhvm.conf` being included prior so that php requests are handled. - -Now in your nginx `server` configuration you can then include the `hhvm.conf` and `silverstripe.conf` files -to complete the configuration required for PHP/HHVM and SilverStripe. - -e.g. `/etc/nginx/sites-enabled/mysite`: - - server { - listen 80; - root /var/www/mysite/public; - server_name www.example.com; - - error_log /var/log/nginx/mysite.error.log; - access_log /var/log/nginx/mysite.access.log; - - include /etc/nginx/hhvm.conf; - include /etc/nginx/silverstripe.conf; - } - -For more information on nginx configuration, please see the [nginx installation](configure_nginx) page.