lighter_informatization.conf 1.2 KB

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