Skip to content

Instantly share code, notes, and snippets.

@akaNightmare
Last active August 29, 2015 14:19
Show Gist options
  • Save akaNightmare/c983586e86f987c67196 to your computer and use it in GitHub Desktop.
Save akaNightmare/c983586e86f987c67196 to your computer and use it in GitHub Desktop.
Zend2 + nginx VHOST
server {
listen 80;
listen 443 ssl;
server_name ssl.lan;
return 301 $scheme://www.ssl.lan$request_uri;
}
server {
listen 80;
listen 443 ssl;
server_name www.ssl.lan;
charset utf-8;
access_log /var/www/zend_ssls/data/log/n_access.log;
error_log /var/www/zend_ssls/data/log/n_error.log;
index index.php;
root /var/www/zend_ssls/public;
ssl on;
ssl_certificate /home/izubok/_cert/cert.crt;
ssl_certificate_key /home/izubok/_cert/cert.key;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
ssl_prefer_server_ciphers on;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param APPLICATION_ENV development;
}
location = /favicon.ico {
access_log off;
log_not_found off;
}
location = /robots.txt {
access_log off;
log_not_found off;
}
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment