最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Ubuntu系统部署HHVM网站环境(LEMH)
时间:2015-07-20 编辑:简简单单 来源:一聚教程网
代码如下 | 复制代码 |
apt-get update
apt-get install nginx |
代码如下 | 复制代码 |
apt-get remove --purge mysql-server mysql-client mysql-common
apt-get autoremove rm -rf /var/lib/mysql apt-get autoclean |
代码如下 | 复制代码 |
apt-get install software-properties-common
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db add-apt-repository 'deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main' apt-get update |
代码如下 | 复制代码 |
apt-get install mariadb-server
|
代码如下 | 复制代码 |
apt-get install php5-fpm php5-mysql php5-curl
|
代码如下 | 复制代码 |
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 apt-get update apt-get install hhvm |
代码如下 | 复制代码 |
sh /usr/share/hhvm/install_fastcgi.sh
|
代码如下 | 复制代码 |
service hhvm restart
|
代码如下 | 复制代码 |
vi /var/www/html/phpinfo.php
|
代码如下 | 复制代码 |
vi /etc/nginx/sites-available/my-site
|
代码如下 | 复制代码 |
server {
listen 80; listen [::]:80; root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm; server_name laozuo.org;
include hhvm-with-fallback.conf; location / {
# First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
# location @fallback { # include snippets/fastcgi-php.conf; # # # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one # location ~ /\.ht { deny all; } } |
代码如下 | 复制代码 |
vi /etc/nginx/hhvm-with-fallback.conf
|
代码如下 | 复制代码 |
location ~ \.(hh|php)$ {
proxy_intercept_errors on; error_page 500 501 502 503 = @fallback; fastcgi_keep_conn on;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } |
代码如下 | 复制代码 |
nginx -t
|
代码如下 | 复制代码 |
service nginx restart
|
原文来自 :http://www.laozuo.org/6383.html
相关文章
- 网站404错误如何解决 网站404错误解决的方法介绍 12-14
- 酒店网站设计实例欣赏 11-30
- 网站文字配色分享 11-22
- 内容型网站盈利方法介绍 10-31
- 网站盈利模式分享 10-31
- 图库网站分享 10-24