Advertisement
Guest User

Untitled

a guest
Jun 1st, 2014
1,146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. upstream connect {
  2. server 127.0.0.1:8080;
  3. }
  4.  
  5. server {
  6. server_name admin.example.com www.admin.example.com;
  7. listen 80;
  8. return 301 https://admin.example.com$request_uri;
  9. }
  10.  
  11. server {
  12. listen 80;
  13. server_name ankieta.example.com www.ankieta.example.com;
  14. add_header Access-Control-Allow-Origin $http_origin;
  15. add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, PATCH, DELETE';
  16. add_header 'Access-Control-Allow-Credentials' 'true';
  17. add_header 'Access-Control-Allow-Headers' 'Access-Control-Request-Method,Access-Control-Request-Headers,Cache,Pragma,Authorization,Accept,Accept-Encoding,Accept-Language,Host,Referer,Content-Length,Origin,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
  18. return 301 https://ankieta.example.com$request_uri;
  19. }
  20.  
  21. server {
  22. server_name admin.example.com;
  23. listen 443 ssl;
  24. ssl_certificate /srv/ssl/14182263.pem;
  25. ssl_certificate_key /srv/ssl/admin_i_ankieta.example.com.key;
  26.  
  27. ssl_protocols SSLv3 TLSv1;
  28. ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM;
  29.  
  30. location / {
  31. proxy_pass http://connect;
  32. }
  33. }
  34.  
  35. server {
  36. server_name ankieta.example.com;
  37. listen 443 ssl;
  38. ssl_certificate /srv/ssl/14182263.pem;
  39. ssl_certificate_key /srv/ssl/admin_i_ankieta.example.com.key;
  40.  
  41. ssl_protocols SSLv3 TLSv1;
  42. ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM;
  43.  
  44. root /srv/limesurvey;
  45. index index.php;
  46.  
  47. add_header 'Access-Control-Allow-Origin' $http_origin;
  48. add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, PATCH, DELETE';
  49. add_header 'Access-Control-Allow-Credentials' 'true';
  50. add_header 'Access-Control-Allow-Headers' 'Access-Control-Request-Method,Access-Control-Request-Headers,Cache,Pragma,Authorization,Accept,Accept-Encoding,Accept-Language,Host,Referer,Content-Length,Origin,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
  51.  
  52. client_max_body_size 4M;
  53.  
  54. location / {
  55. try_files $uri $uri/ /index.php?q=$uri&$args;
  56. }
  57.  
  58. location ~ /*.php$ {
  59.  
  60. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  61. #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  62. include fastcgi_params;
  63. fastcgi_param SCRIPT_FILENAME /srv/limesurvey$fastcgi_script_name;
  64. # fastcgi_param HTTPS $https;
  65. fastcgi_intercept_errors on;
  66. fastcgi_pass 127.0.0.1:9000;
  67. }
  68.  
  69. location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
  70. expires max;
  71. log_not_found off;
  72. }
  73.  
  74.  
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement