dinsdag 9 juli 2013

Site Redirection in Debian

Hi all, I finally managed to redirect a site in Debian great thanks to my brilliant colleague Rob Maas (Check out his blog http://www.progob.nl/robmaaseu/ ).

First of all we tried to forward this site to my local domain within Debian. We did this thru the zone file in Bind9.

$TTL    604800
@       IN      SOA     NS1.domain.nldomain.thuis.domain.nl. (
                2013070901              ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
;Nameservers
;
Jeromic.nl      IN      NS      NS1.domain.nl

@       IN      NS      domain.nl.
@       IN      A       127.0.0.1
@       IN      AAAA    ::1

;
;Reverse Proxy
*                       IN      A       [my private ip]

;
;Alias
blog.jeromic.nl         IN      CNAME   superitconsultant.blogspot.nl

Only that didn't work. so Rob gave me another option to do this in apache.

cd /etc/apache2/sites-enabled/ nano 014-blog

After this we add the following in our Virtual host file.

<VirtualHost *:80>
       ServerName blog.domain.nl

       CustomLog       /var/log/apache2/blog_access.log combined
       ErrorLog        /var/log/apache2/blog_error.log

       Redirect / http://http://superitconsultant.blogspot.nl/

</VirtualHost>

After this we restarted the service

service apache2 restart

And the redirection is working properly

All thanks go to Rob Maas.

Thanks and please leave a comment

Geen opmerkingen:

Een reactie posten