Guest User

Untitled

a guest
Oct 22nd, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. server
  2. {
  3. listen 80;
  4. listen 443 ssl;
  5. ssl_certificate /home/wwwroot/default/ssl/cert.key.pem;
  6. ssl_certificate_key /home/wwwroot/default/ssl/cert.key;
  7. ssl_dhparam /home/wwwroot/default/ssl/cert.pem;
  8. keepalive_timeout 60;
  9. #listen [::]:80 default_server ipv6only=on;
  10. server_name www.domain.com domain.com;
  11. if ( $scheme = http ){
  12. return 301 https://$server_name$request_uri;
  13. }
  14. index index.html index.htm index.php;
  15. root /home/wwwroot/default;
  16.  
  17. location / {
  18. proxy_pass http://remote.server.ip.address/;
  19. proxy_set_header X-Real-IP $remote_addr;
  20. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  21. }
  22.  
  23. location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
  24. {
  25. expires 1d;
  26. }
  27.  
  28. location ~ .*.(js|css)?$
  29. {
  30. expires 12h;
  31. }
Add Comment
Please, Sign In to add comment