This VPS configuration is great for Nette framework.
- Nginx (latest stable version)
This VPS configuration is great for Nette framework.
version: '2' | |
services: | |
php-apache: | |
image: php:apache | |
ports: | |
- "80:80" | |
volumes: | |
- $PWD:/var/www/html |
# This is the sample from Scaling PHP applications book | |
#Set the path where the cache is stored; Set the zone name(my_app), totalsize (100m),and max life time(60m) | |
fastcgi_cache_path /tmp/cachelevels=1:2keys_zone=my_app:100minactive=60m; | |
#Set the cache key used,in this case: httpsGETtest.com/somepage.html | |
fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
server{ | |
listen 80; |
#change it to latest version | |
NPS_VERSION=1.11.33.0; | |
echo "Changing Directory to $HOME..." | |
cd $HOME; | |
echo "Nginx version to install: " && \ | |
read NGINX_VERSION && \ | |
echo "Downloading nginx-$NGINX_VERSION..." && \ | |
wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz && \ | |
echo "Installing Nginx Dependencies..." && \ |
#!/bin/bash | |
# Following the guide found at this page | |
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html | |
echo "\r\nUpdating system ...\r\n" | |
sudo apt-get update | |
# Create folder to place selenium in |
$ npm install
$ ./node_modules/.bin/webpack-dev-server
$ open http://localhost:8080/webpack-dev-server/
Notes:
http://localhost:8080/webpack-dev-server/index.html
.http://localhost:8080/index.html
.server { | |
listen 80; | |
server_name example.com; | |
root d:/webs/example.com/www; | |
index index.php index.html; | |
try_files $uri $uri/ /index.php?$args; | |
location ~ \.phpt?$ { | |
try_files $uri @missing; |
By default when Nginx starts receiving a response from a FastCGI backend (such as PHP-FPM) it will buffer the response in memory before delivering it to the client. Any response larger than the set buffer size is saved to a temporary file on disk.
This process is outlined at the Nginx ngx_http_fastcgi_module page manual page.
# Please paste to folder common/common.conf | |
index index.html index.htm; | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root html; | |
} | |
#location ~ \.(js|ico|gif|jpg|png|css|rar|zip|tar\.gz)$ { } |