Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upstream backend-wwwdomen1 {server unix:/var/run/php5-wwwdomen1.sock;}
- server {
- listen 80;
- server_name domen1;
- location / {
- rewrite ^/(.*)$ https://domen1/$1 permanent;
- }
- }
- server {
- listen 443;
- server_name domen1;
- root /home/domen1/www;
- access_log /home/domen1/logs/access.log;
- error_log /home/domen1/logs/error.log;
- index index.php index.html;
- rewrite_log on;
- server_tokens off;
- #SSL configuration
- ssl on;
- ssl_certificate /home/wwwdomen1/ssl/domen1_ca.crt;
- ssl_certificate_key /home/wwwdomen1/ssl/domen1_ca.key;
- ssl_session_timeout 5m;
- ssl_protocols SSLv2 SSLv3 TLSv1;
- ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
- location / {
- try_files $uri $uri/ @rewrite;
- }
- location @rewrite {
- rewrite ^/(.*)$ /index.php?q=$1;
- }
- location ~ \.php$ {
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_pass backend-wwwdomen1;
- }
- location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|bmp|map)$ {
- access_log off;
- expires 10d;
- break;
- }
- location ~ /\.ht {
- deny all;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement