docker 开发环境
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.
 

98 lines
2.9 KiB

server {
server_name m.takeda.hbraas.com;
# access_log /data1/wwwlogs/takeda.access.log combined;
# error_log /data1/wwwlogs/takeda.error.log;
## --- logs section begin ----
# 目录名:需要先创建日志目录,然后chown -R www $proj 修改所有者
access_log /www/log/nginx/takeda/m.nginx.access.log main;
error_log /www/log/nginx/takeda/m.nginx.error.log;
#set $proj 'takeda';
#set $subsys 'm';
#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 ----
# listen 80;
listen 443;
# ssl on;
ssl_certificate /www/cert/takeda/fullchain.pem;
ssl_certificate_key /www/cert/takeda/privkey.pem;
ssl_session_timeout 10m;
ssl_protocols TLSv1.2;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:HIGH:!aNULL:!MD5:!RC4:!DHE:!RSA;
ssl_prefer_server_ciphers on;
root /www/takeda_main/proj_src/shop/frontend/web;
index index.html index.htm index.php;
# include error_page.conf;
location ~ ^/callback\d*\.php {
rewrite /(.*)\.php /index.php?r=aff/callback/$1 last;
}
location ~ ^/takeda{
root /www/takeda_main/proj_src/web_dist_server/dist/h5statics/;
try_files $uri $uri/ /index.html;
}
location ~ ^/ministatics {
root /www/takeda_main/proj_src/web_dist_server/dist/;
try_files $uri $uri/ /index.html;
}
location ~ ^/userstatics {
root /www/takeda_main/proj_src/web_dist_server/dist/;
try_files $uri $uri/ /index.html;
}
location ~ ^/api/(.*) {
rewrite ^/api/(.*) /$1 break;
root /www/takeda_main/proj_src/shop/frontend/web;
}
location ~ ^/ita {
rewrite ^/(ita)/(.*) /$2 ;
root /www/takeda_main/proj_src/shop/modules/ita_frontend/views/;
index index.php index.html index.htm;
location ~ .*\.(php|php5)?$ {
fastcgi_pass php72:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico|mp3)$ {
rewrite ^/.*(/assets/.*) /$1 break;
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
rewrite ^/.*(/assets/.*) /$1 break;
expires 7d;
access_log off;
}
}
location ~ .*\.(php|php5)?$ {
#fastcgi_pass remote_php_ip:9000;
# fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_pass php72:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico|mp3)$ {
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
}
server {
listen 80;
server_name m.takeda.hbraas.com;
rewrite ^/(.*) https://$server_name$request_uri? permanent;
}