server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.94cb.com 94cb.com m.94cb.com api.94cb.com cdn.94cb.com;
ssl on;
ssl_certificate_key
/etc/letsencrypt/live/www
.94cb.com
/privkey
.pem;
ssl_certificate
/etc/letsencrypt/live/www
.94cb.com
/fullchain
.pem;
set
$redirect_to_https 1;
if
($host =
'cdn.94cb.com'
) {
set
$redirect_to_https 0;
}
if
($scheme = https) {
set
$redirect_to_https 0;
}
if
($redirect_to_https = 1) {
rewrite ^(.*) https:
//
$host$1 permanent;
}
root
/www/web/carbon/public_html
;
index index.html index.php index.htm;
include
/www/web/carbon/public_html/nginx
.conf;
location
/push
{
proxy_pass http:
//127
.0.0.1:2000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
}
location ~ \.php(.*)$ {
fastcgi_pass unix:
/tmp/php-71-cgi
.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $DOCUMENT_ROOT$fastcgi_script_name;
fastcgi_param PATH_INFO $2;
include fcgi.conf;
}
location ~.*\.(gif|jpg|jpeg|png|bmp|swf|ico)$
{
expires 7d;
}
location ~.*\.(js|css|html)$
{
expires 24h;
}
access_log
/www/web_logs/94cb
.com_access.log wwwlogs;
error_log
/www/web_logs/94cb
.com_error.log;
}