Let’s Encrypt免费的https证书

申请Let's Encrypt 免费https证书脚本。他的证书有效期只有90天,但是可以用自动化脚本继约,所以还是不很错的选择。 1. letsencrypt.sh证书的生成 1.1 目录的生成 cd ~ git clone https://github.com/lukas2511/letsencrypt.sh sudo mkdir -p /etc/letsencrypt.sh s...


在ubuntu手动安装nginx1.6的/etc/init.d/nginx配置

手动安装升级到nginx1.6 cd tmp/ wget http://nginx.org/download/nginx-1.6.0.tar.gz tar -zxvf nginx-1.6.0.tar.gz cd nginx-1.6.0/ ./configure --with-http_gzip_static_module --with-http_stub_status_module --w...


Introspected tunnels to localhost

本地rails服务映射到服务器上,进行外网测试! ssh -C2qTnN -R 3040:localhost:3000 deploy@xx.xx.xx.xx 本地3000应射到远程服务器3040端口 ```bash nginx.conf server { server_name qt.test.growcn.com; underscores_in_headers on; ...


优化Nginx的gzip_static配置让Rails的AssetPipeline的技持压缩gz传输

./configure --with-http_gzip_static_module gzip on; gzip_min_length 1024; gzip_buffers 4 8k; gzip_types text/plain application/x-javascript text/css text/html application/xml; ...


Rails rvm Passenger with Nginx

gem install passenger rvmsudo passenger-install-nginx-module ```bash /opt/nginx/conf/nginx.conf server { listen 80; server_name www.xxx.com; root /home/user/app/public...


关于nginx的auth_basic认证配置

创建htpasswd文件 sudo htpasswd -c -m conf/htpasswd <user> 如果没有该命令,先安装 sudo apt-get install apache2-utils ```bash nginx.conf server { listen 80; charset UTF-8; server_name domai...


Nginx配置autoindex浏览目录列表

Nginx默认是不允许列出整个目录的。如需此功能, 打开nginx.conf文件,在location server 或 http段中加入 autoindex on; 另外两个参数最好也加上去: autoindex_exact_size off; 默认为on,显示出文件的确切大小,单位是bytes。 改为off后,显示出文件的大概大小,单位是kB或者MB或者GB autoinde...