LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Default localhost settings (https://www.linuxquestions.org/questions/linux-newbie-8/default-localhost-settings-4175588997/)

iFunction 09-08-2016 03:17 AM

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
iFunc

ferrari 09-08-2016 03:31 AM

Did you really edit directly and save as file of same name (as opposed to editing and saving as foo.com.conf)? Anyway, it doesn't contain a lot - apart from some comments, it has....

Code:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>


iFunction 09-08-2016 03:51 AM

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.

regards
iFunk


All times are GMT -5. The time now is 07:11 PM.