Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-08-2016, 04:17 AM   #1
Registered: Nov 2015
Posts: 248

Rep: Reputation: Disabled
Default localhost settings

Hi there,

Over the past few weeks I have been trying to learn about building a LAMP server and followed countless tutorials. However it has made a little mess of my system, as I can no longer access localhost from a browser. I am suspecting it is /etc/apache2/sites-enabled/000-default.conf that I changed, and although I can see what I have changed, I have no idea what it said originally. I then tried something that I found online about recovering default set up files using dpkg which also did not work so now I have nothing. I want to go back to the default html page, whilst currently I am now stuck at a 404, which makes learning a little on the tricky side.

Is there an easy way to reset all this without actually reinstalling the whole operating system. This is on a raspberry pi, so there is nothing really important on there, but it would be nice to know what is happening and how to revert changes.

Kind regards
Old 09-08-2016, 04:31 AM   #2
LQ Guru
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,054

Rep: Reputation: 962Reputation: 962Reputation: 962Reputation: 962Reputation: 962Reputation: 962Reputation: 962Reputation: 962
Did you really edit directly and save as file of same name (as opposed to editing and saving as Anyway, it doesn't contain a lot - apart from some comments, it has....

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
1 members found this post helpful.
Old 09-08-2016, 04:51 AM   #3
Registered: Nov 2015
Posts: 248

Original Poster
Rep: Reputation: Disabled
Yes, unfortunately I did, however, as this particular pi is my development test thing, the best lesson I have learned from this is to rename the original file as a backup so I don't make the same mistakes twice.

Thanks for this, that is really helpful.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Default IP for LocalHost in RedHat 6 e_oneill4 Linux - Newbie 5 12-01-2014 04:46 PM
Localhost pointing to default page if I don't specify the port number in the address rajaoLQ Linux - Server 6 08-24-2009 03:52 PM
How to reset monitor settings to default autodetected settings in openSUSE? chengas123 Linux - General 2 09-17-2008 12:24 PM
apache2 + mod-ssl keeps loading the default localhost.xxxxxx cert STEBEL Linux - Newbie 3 11-26-2005 08:49 AM
default /etc/ settings? albinojellyfish Linux - Security 6 07-24-2005 03:08 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration