pantsarny server {
server_name beta.domainname.ru www.beta.domainname.ru;
listen 888.8.888.88;
listen 888.8.888.88:443 ssl;
ssl_certificate /home/domainname/domains/beta.domainname.ru/ssl.cert;
ssl_certificate_key /home/domainname/domains/beta.domainname.ru/ssl.key;
client_max_body_size 50m;
access_log /home/domainname/domains/beta.domainname.ru/logs/beta.domainname.ru_access_log;
error_log /home/domainname/domains/beta.domainname.ru/logs/beta.domainname.ru_error_logs;
add_header Access-Control-Allow-Origin * always;
add_header 'Access-Control-Expose-Headers' 'X-Pagination-Current-Page, X-Pagination-Page-Count, X-Pagination-Per-Page, X-Pagination-Total-Count' always;
add_header 'Access-Control-Allow-Methods' 'GET, PUT, POST, DELETE, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept, Authorization' always;
send_timeout 600;
root /home/domainname/domains/beta.domainname.ru/public_html/web;
index index.php index.html;
location / {
index index.php;
try_files $uri $uri/ /index.php?$args;
root /home/domainname/domains/beta.domainname.ru/public_html/web;
if ($request_method = OPTIONS ) {
add_header Access-Control-Allow-Origin * always;
add_header 'Access-Control-Allow-Methods' 'GET, PUT, POST, DELETE, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept, Authorization' always;
return 200;
}
}
gzip on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
# expires max;
try_files $uri =404;
}
location ~ ^/(protected|framework|themes/\w+/views) {
deny all;
}
location ~* \.(php)$ {
fastcgi_pass unix:/var/php-nginx/143582299222680.sock/socket;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
try_files $uri = 404;
fastcgi_read_timeout 600;
fastcgi_send_timeout 600;
}
location ~ /\. {
deny all;
log_not_found off;
}
}