I need to test a website before changing DNS records.
There are tools such as Skipdns.link and in the past hostcx. I need this but without the limitation of skipdns.link.
For example all URLs of skipdns.example.com should showing the content of example.com. For this I made a start:
server {
listen 80;
server_name skipdns.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name skipdns.example.com;
ssl_certificate /etc/letsencrypt/live/skipdns.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/skipdns.example.com/privkey.pem;
location / {
proxy_pass https://example.com;
proxy_set_header Host example.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Substitutie van example.com naar skipdns.example.com
sub_filter 'example.com' 'skipdns.example.com';
sub_filter_once off;
# Optioneel: Substitutie van HTTPS naar HTTP, als nodig
sub_filter 'https://skipdns.example.com' 'http://skipdns.example.com';
# URL's in HTTP headers en response bodies aanpassen
sub_filter_types *;
}
}
The website example.com is shown but the URLs are not all rewritten. If I click on the logo of the menu it still shows example.com.
What am I missing?