You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.9 KiB
62 lines
1.9 KiB
server { |
|
listen 80; |
|
server_name reg.merck.huiyuan.com; |
|
# access_log /data1/wwwlogs/demo.access.log combined; |
|
|
|
|
|
## --- logs section begin ---- |
|
# 目录名:需要先创建日志目录,然后chown -R www $proj 修改所有者 |
|
access_log /data/wwwlogs/merck/internal.nginx.access.log main; |
|
error_log /data/wwwlogs/merck/internal.nginx.error.log; |
|
|
|
#set $proj 'merck'; |
|
#set $subsys 'reg'; |
|
|
|
#access_log /data/wwwlogs/${proj}/${subsys}_${year}${month}${day}_nginx_access.log main; |
|
#error_log /data/wwwlogs/${proj}/${subsys}_${year}${month}${day}_nginx_error.log; |
|
## --- logs section end ---- |
|
|
|
|
|
root /data1/wwwroot/default/merck/huiyuan/services/web; |
|
index index.html index.htm index.php; |
|
|
|
gzip on; |
|
gzip_min_length 1k; |
|
gzip_buffers 4 16k; |
|
#gzip_http_version 1.0; |
|
gzip_comp_level 2; |
|
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; |
|
gzip_vary on; |
|
gzip_disable "MSIE [1-6]\."; |
|
|
|
location /nginx_status { |
|
stub_status on; |
|
access_log off; |
|
allow 127.0.0.1; |
|
deny all; |
|
} |
|
|
|
location ~ ^/[0-9\-a-z]*$ { |
|
#fastcgi_pass remote_php_ip:9000; |
|
# fastcgi_pass unix:/dev/shm/php-cgi.sock; |
|
fastcgi_pass 127.0.0.1:9000; |
|
fastcgi_index index.php; |
|
include fastcgi.conf; |
|
fastcgi_param SCRIPT_FILENAME $document_root/index.php; |
|
if (!-e $request_filename){ |
|
rewrite ^/(.*)/index.php last; |
|
} |
|
} |
|
|
|
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico)$ { |
|
root /data1/wwwroot/default/merck/huiyuan/services/views; |
|
expires 30d; |
|
access_log off; |
|
} |
|
location ~ .*\.(js|css|html|ttf|woff|woff2)$ { |
|
root /data1/wwwroot/default/merck/huiyuan/services/views; |
|
expires 7d; |
|
access_log off; |
|
} |
|
} |
|
|
|
|