test.conf 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. server {
  2. listen 80 ;
  3. listen 443 ssl http2;
  4. server_name test.com;
  5. root /www/test-runner/;
  6. index index.php index.html index.htm;
  7. #charset koi8-r;
  8. access_log /dev/null;
  9. #access_log /var/log/nginx/nginx.localhost.access.log main;
  10. error_log /var/log/nginx/a.com.error.log warn;
  11. #error_page 404 /404.html;
  12. ssl_certificate /ssl/4041818_zhanganqi.com.pem;
  13. ssl_certificate_key /ssl/4041818_zhanganqi.com.key;
  14. # redirect server error pages to the static page /50x.html
  15. #
  16. error_page 500 502 503 504 /50x.html;
  17. location = /50x.html {
  18. root /usr/share/nginx/html;
  19. }
  20. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  21. #
  22. #location ~ \.php$ {
  23. # proxy_pass http://127.0.0.1;
  24. #}
  25. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  26. #
  27. location / {
  28. if (!-e $request_filename)
  29. {
  30. rewrite ^(.*)$ /index.php?s=$1 last;
  31. break;
  32. }
  33. }
  34. location ~ \.php$ {
  35. fastcgi_pass php:9000;
  36. include fastcgi-php.conf;
  37. include fastcgi_params;
  38. }
  39. # deny access to .htaccess files, if Apache's document root
  40. # concurs with nginx's one
  41. #
  42. #location ~ /\.ht {
  43. # deny all;
  44. #}
  45. }