diff --git a/configs/nginx/conf.d/newcabinet.dot-dot.ru.conf b/configs/nginx/conf.d/newcabinet.dot-dot.ru.conf index e57a749..77536c1 100644 --- a/configs/nginx/conf.d/newcabinet.dot-dot.ru.conf +++ b/configs/nginx/conf.d/newcabinet.dot-dot.ru.conf @@ -1,23 +1,21 @@ server { listen 80; - server_name staginglms.dot-dot.ru; + server_name newlms.dot-dot.ru; return 301 https://$server_name$request_uri; } server { listen 443 ssl ; - server_name staginglms.dot-dot.ru; + server_name newlms.dot-dot.ru; ssl_certificate /etc/nginx/ssl/dot-dot.crt; ssl_certificate_key /etc/nginx/ssl/dot-dot.key; - root /application/public; - client_max_body_size 30m; location / { - proxy_pass http://lms:3000; + proxy_pass http://dot-dot-lms:80; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -27,101 +25,4 @@ server { proxy_buffering off; proxy_cache off; } - - location @rewriteapp { - rewrite ^(.*)$ /index.php/$1 last; - } - - location /logout { - try_files $uri @rewriteapp; - } - - location /api { - rewrite ^(.*)$ /index.php/$1 last; - } - - location /clockwork { - rewrite ^(.*)$ /index.php/$1 last; - } - - location /__clockwork { - rewrite ^(.*)$ /index.php/$1 last; - } - - location /pdf { - rewrite ^(.*)$ /index.php/$1 last; - } - - location /1c { - rewrite ^(.*)$ /index.php/$1 last; - } - - location /socket { - try_files $uri @rewriteapp; - } - - location /admin { - try_files $uri @rewriteapp; - } - - location ~* \/admin\/.*(js|jpg|png|css|woff|woff2)$ { - proxy_pass http://static; - } - - location /media { - try_files $uri @rewriteapp; - } - - location /img { - proxy_pass http://static; - # alias /application/public/img; - # try_files $uri /index.php$request_uri; - # expires 6M; - } - - location /robots.txt { - proxy_pass http://static; - } - - location /connection/websocket { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - proxy_pass http://centrifugo; - } - - location /socket.io/auctionreload { - access_log /var/log/nginx/ws_access.log json; - error_log /var/log/nginx/ws_error.log; - - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; - proxy_set_header Host $host; - #proxy_pass http://php:8080/; - } - - location ~ ^/index\.php(/|$) { - if ($request_method = 'OPTIONS') { - add_header 'Access-Control-Allow-Origin' $http_origin; - add_header 'Access-Control-Allow-Credentials' 'true'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE'; - add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Expeditor-Domain,Authorization'; - add_header 'Access-Control-Max-Age' 1728000; - add_header 'Content-Type' 'text/plain charset=UTF-8'; - add_header 'Content-Length' 0; - return 204; - } - - #add_header 'Access-Control-Allow-Origin' $http_origin; - add_header 'Access-Control-Allow-Origin' *; - add_header 'Access-Control-Allow-Credentials' 'true'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE'; - add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Expeditor-Domain,Authorization'; - - fastcgi_pass backend:9001; - fastcgi_split_path_info ^(.+\.php)(/.*)$; - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - } }