12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- server {
- listen 80 default_server;
- server_name _;
- return 404;
- }
- server {
- charset utf-8;
- client_max_body_size 128M;
- sendfile off;
- listen 80;
- listen 443 ssl;
- server_name localhost;
- root /app/sapi/web/;
- index index.php;
- access_log /app/sapi/runtime/logs/access-$server_name.log;
- error_log /app/sapi/runtime/logs/error.log;
- ssl_certificate_key /app/data/key;
- ssl_certificate /app/data/cert;
- location / {
- if ($args ~ x-oss-process=(style\/\d+[w|h])){
- proxy_pass http://127.0.0.1/v1/common/thumbnail?file=$document_uri&x-oss-process=$1;
- }
- try_files $uri $uri/ /index.php$is_args$args;
- }
- location ~ \.php$ {
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_pass unix:/tmp/php-cgi.sock;
- try_files $uri =404;
- }
- location ~ /\.(ht|svn|git) {
- deny all;
- }
- }
- server {
- charset utf-8;
- client_max_body_size 128M;
- sendfile off;
- listen 80; ## listen for ipv4
- server_name 127.0.0.1;
- root /app/sapi/web/;
- index index.php;
- location / {
- try_files $uri $uri/ /index.php$is_args$args;
- }
- location ~ \.php$ {
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_pass unix:/tmp/php-cgi.sock;
- try_files $uri =404;
- }
- location ~ /\.(ht|svn|git) {
- deny all;
- }
- }
|