Skip to content

Commit

Permalink
Merge pull request #4 from ytake/develop
Browse files Browse the repository at this point in the history
for hh
  • Loading branch information
ytake committed Sep 12, 2016
2 parents 80ebc6d + 38122dd commit f39d0c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions scripts/nginx-server-hhvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ block="server {
listen ${4:-443} ssl;
server_name $1;
root \"$2\";
index index.html index.htm index.php;
index index.html index.htm index.php index.hh;
charset utf-8;
location / {
try_files \$uri \$uri/ /index.php?\$query_string;
Expand All @@ -29,12 +29,13 @@ block="server {
access_log off;
error_log /var/log/nginx/$1-error.log error;
sendfile off;
location ~ \.php$ {
location ~ \.(hh|php)$ {
fastcgi_keep_conn on;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME \$realpath_root\$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
Expand All @@ -48,6 +49,7 @@ echo "$block" > "/etc/nginx/conf.d/$1.conf"
# for HACK
touch $2/.hhconfig

/usr/local/bin/hh_server -d $2 --waiting-client 6
/bin/systemctl restart php-fpm
/bin/systemctl restart nginx
/bin/systemctl restart hhvm
2 changes: 1 addition & 1 deletion scripts/nginx-server-php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ block="server {
fastcgi_pass unix:/var/run/php7-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME \$realpath_root\$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
Expand Down

0 comments on commit f39d0c9

Please sign in to comment.