Разворачиваем новый поддомен new.prodject.ru. Css почуму-то цепляется со старого. Конфиг nginx нового домена
server {
listen 80;
server_name new.prodject.ru;
return 301
https://$host$request_uri;
error_log /var/log/nginx/nginx_prodject1.ru_error.log;
client_max_body_size 40M;
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
gzip_comp_level 5;
location ~ ^/cache/ {
proxy_pass
http://127.0.0.1:8080;
}
location ~ ^/admin/ {
proxy_pass
http://127.0.0.1:8080;
}
location / {
proxy_pass
127.0.0.1:8080/;
proxy_read_timeout 300s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
}
location ~* \.(html|jpeg|jpg|gif|png|css|js|pdf|txt|tar|ico|swf|flv|avi|djvu|mp3|mp4|3gp)$ {
root /var/www/domains/new.prodject.ru;
proxy_cache static_cache;
proxy_cache_valid 200 302 10m;
proxy_cache_valid 404 1m;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
Конфиг старого
server {
listen 80;
server_name prodject.ru old.prodject.ru;
return 301
https://$host$request_uri;
error_log /var/log/nginx/nginx_prodject.ru_error.log;
client_max_body_size 40M;
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
gzip_comp_level 5;
location ~ ^/cache/ {
proxy_pass
http://127.0.0.1:8080;
}
location ~ ^/admin/ {
proxy_pass
http://127.0.0.1:8080;
}
location / {
proxy_pass
127.0.0.1:8080/;
proxy_read_timeout 300s;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
}
location ~* \.(html|gif|png|css|js|pdf|txt|tar|ico|swf|flv|avi|djvu|mp3|mp4|3gp)$ {
root /var/www/domains/prodject.ru;
proxy_cache static_cache;
proxy_cache_valid 10m;
proxy_cache_valid 404 1m;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}