I need to move dev.mydomain.com to mydomain.com to make new site available on the official domain.
In order to do this I:
- created new vhost record in /etc/nginx/sites-available for domain.com
- created symlink in sites-enabled for #1
- reloaded nginx
At this point the site is available for either dev.mydomain.com and mydomain.com. Now I need to disable dev.mydomain.com:
- removed symlink form sites-enabled for dev.mydomain.com
- reloaded nginx
As it doesn't have any effect I also tried:
- remove vhost record for dev.mydomain.com form sites-available
- reload whole server
- comment out any mention of dev.mydomain.com in varnish default.vcl
- purge Varnish cache
System: Ubuntu 14.04, Varnish on 80 port, Nginx on 8080
UPD: the vhost is configured to use HTTPS only.
UPD2: Nginx vhost config:
server {
listen 443 ssl;
server_name mydomain.com www.mydomain.com;
ssl_certificate /etc/nginx/ssl/mydomain.com.crt;
ssl_certificate_key /etc/nginx/mydomain.com.key;
root /home/mydomain.com/web;
[...]
}
server {
listen 127.0.0.1:8080;
server_name mydomain.com www.mydomain.com;
root /home/hobancards/web;
[...]
}