letsencrypt nginx
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
cd /opt/letsencrypt
./letsencrypt-auto certonly -a webroot --webroot-path=/var/www/aefm -d aefm.pt -d www.aefm.pt -d museu.aefm.pt -d w3.aefm.pt
NGINX, PHP-FPM, e MariaDB no debian 7
atualizar o sistema
# apt-get update && apt-get upgrade
instalar nginx
apt-get install nginx
iniciar o serviço
service nginx start
editar o ficheiro /etc/nginx/nginx.conf e substituir
worker_processes 8;
deve ser igual ao número de cores do processador
access_log off;
para melhorar a performance de e/s
client_max_body_size 64m;
instalar o php-fpm
# apt-get install php5-fpm php5-mysqlnd
config nginx
server {
listen 80;
server_name eduardo.easypc.pt;root /var/www/html/eduardo.easypc.pt; ## <-- Your only path reference.
# SSL configuration
#
# listen 443 ssl;
listen 443 ssl default_server;# listen [::]:443 ssl default_server;
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
include snippets/snakeoil.conf;location ~* /sites/default/files/private {
internal;
}
problemas com a visualização de ficheiros privados do drupal no nginx
location ~* ^(?!/system/files).*\.(js|css|png|jpg|jpeg|gif|ico)$ {
# If the image does not exist, maybe it must be generated by drupal (imagecache)
try_files $uri @drupal;
expires 7d;
log_not_found off;
}