Debian7 404 error

Was working on Debian 7 server and on trying to update using command apt-get update was getting 404 error

I could see 404 error on command apt-get update

root@debian:/home/nvc# vi /etc/resolv.conf
root@debian:/home/nvc# apt-get update
Ign cdrom://[Debian GNU/Linux 7.11.0 Wheezy – Official amd64 DVD Binary-1 20160605-17:36] wheezy Release.gpg
Ign cdrom://[Debian GNU/Linux 7.11.0 Wheezy – Official amd64 DVD Binary-1 20160605-17:36] wheezy Release
Ign cdrom://[Debian GNU/Linux 7.11.0 Wheezy – Official amd64 DVD Binary-1 20160605-17:36] wheezy/contrib amd64 Packages/DiffIndex
Ign cdrom://[Debian GNU/Linux 7.11.0 Wheezy – Official amd64 DVD Binary-1 20160605-17:36] wheezy/main amd64 Packages/DiffIndex
Ign cdrom://[Debian GNU/Linux 7.11.0 Wheezy – Official amd64 DVD Binary-1 20160605-17:36] wheezy/contrib Translation-en_US
Ign cdrom://[Debian GNU/Linux 7.11.0 Wheezy – Official amd64 DVD Binary-1 20160605-17:36] wheezy/main Translation-en_US
Ign http://security.debian.org wheezy/updates Release.gpg
Ign http://security.debian.org wheezy/updates Release
Err http://security.debian.org wheezy/updates/main Sources
404 Not Found [IP: 151.101.128.204 80]
Err http://security.debian.org wheezy/updates/contrib Sources
404 Not Found [IP: 151.101.128.204 80]
Err http://security.debian.org wheezy/updates/main amd64 Packages
404 Not Found [IP: 151.101.128.204 80]
Err http://security.debian.org wheezy/updates/contrib amd64 Packages
404 Not Found [IP: 151.101.128.204 80]
Ign http://security.debian.org wheezy/updates/contrib Translation-en_US
Ign http://security.debian.org wheezy/updates/contrib Translation-en
Ign http://security.debian.org wheezy/updates/main Translation-en_US
Ign http://security.debian.org wheezy/updates/main Translation-en
W: Failed to fetch http://security.debian.org/dists/wheezy/updates/main/source/Sources 404 Not Found [IP: 151.101.128.204 80]

W: Failed to fetch http://security.debian.org/dists/wheezy/updates/contrib/source/Sources 404 Not Found [IP: 151.101.128.204 80]

W: Failed to fetch http://security.debian.org/dists/wheezy/updates/main/binary-amd64/Packages 404 Not Found [IP: 151.101.128.204 80]

W: Failed to fetch http://security.debian.org/dists/wheezy/updates/contrib/binary-amd64/Packages 404 Not Found [IP: 151.101.128.204 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

The solution to this problem was to be clear

/etc/apt/sources.list and add below entries

cat /etc/apt/sources.list
deb http://archive.debian.org/debian wheezy main
deb http://archive.debian.org/debian-security wheezy/updates main

now apt-get working fine

apt-get install vim
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
vim-common vim-runtime vim-tiny
Suggested packages:
ctags vim-doc vim-scripts indent
The following NEW packages will be installed:
vim vim-runtime
The following packages will be upgraded:
vim-common vim-tiny
2 upgraded, 2 newly installed, 0 to remove and 122 not upgraded.
Need to get 5,945 kB of archives.
After this operation, 24.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.debian.org/debian-security/ wheezy/updates/main vim-tiny amd64 2:7.3.547-7+deb7u4 [355 kB]
Get:2 http://archive.debian.org/debian-security/ wheezy/updates/main vim-common amd64 2:7.3.547-7+deb7u4 [163 kB]
Get:3 http://archive.debian.org/debian-security/ wheezy/updates/main vim-runtime all 2:7.3.547-7+deb7u4 [4,586 kB]
Get:4 http://archive.debian.org/debian-security/ wheezy/updates/main vim amd64 2:7.3.547-7+deb7u4 [842 kB]
Fetched 5,945 kB in 0s (9,099 kB/s)
Reading changelogs… Done
(Reading database … 31607 files and directories currently installed.)
Preparing to replace vim-tiny 2:7.3.547-7 (using …/vim-tiny_2%3a7.3.547-7+deb7u4_amd64.deb) …
Unpacking replacement vim-tiny …
Preparing to replace vim-common 2:7.3.547-7 (using …/vim-common_2%3a7.3.547-7+deb7u4_amd64.deb) …
Unpacking replacement vim-common …
Selecting previously unselected package vim-runtime.
Unpacking vim-runtime (from …/vim-runtime_2%3a7.3.547-7+deb7u4_all.deb) …
Adding ‘diversion of /usr/share/vim/vim73/doc/help.txt to /usr/share/vim/vim73/doc/help.txt.vim-tiny by vim-runtime’
Adding ‘diversion of /usr/share/vim/vim73/doc/tags to /usr/share/vim/vim73/doc/tags.vim-tiny by vim-runtime’
Selecting previously unselected package vim.
Unpacking vim (from …/vim_2%3a7.3.547-7+deb7u4_amd64.deb) …
Processing triggers for man-db …
Processing triggers for mime-support …
Setting up vim-common (2:7.3.547-7+deb7u4) …
Setting up vim-tiny (2:7.3.547-7+deb7u4) …
Setting up vim-runtime (2:7.3.547-7+deb7u4) …
Processing /usr/share/vim/addons/doc
Setting up vim (2:7.3.547-7+deb7u4) …
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode