hi i am newly switched to ubuntu 14.04
i am installing laravel
on my lamp server
in tutorial its written to edit this file sudo nano /etc/apache2/sites-available/default
but when i tried to open the same file in my nano editor
the file appears blank ie. nothing to search as its asked in tutorial, how can i configure my default
as suggested in the tutorial.

- 695
- 2
- 7
- 13
3 Answers
Try searching for the same in /etc/apache2/apache2.conf Type- gksu gedit /etc/apache2/apache2.conf
In this file you will find AllowOverride and the DocumentRoot. Edit them as you want.

- 172,746

- 105
-
-
Go to your browser and type localhost in the URL box. If the Apache2 default page appears, then the apache server is working properly and the files should not be blank. If not try re-installing apache using: sudo apt-get install apache2 – raj_praveen May 26 '14 at 10:17
I am using Ubuntu 18.04 Subsystem for Windows 10
and I had that problem plus empty apache2.conf file too.
To get back your ordinary files you have to recover your apache2-utils
by using the following commands in your terminal :
sudo apt-get remove --purge apache2 apache2-utils
sudo apt-get install --reinstall apache2 apache2-utils
But don't forget to take your previous work from /var/www/html
if you have.

- 103
-
I'm getting this error when trying to restart apache: Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details. – Jimit Bhavsar Jun 27 '19 at 10:58
I am trying to do a version of my site that worked with the windows wampp seems that linux variants are not the same or faulty. I was able to make a share across a network work but under apache its not working. I have tried to change all these conf and can not seem to find the right one to allow images to traverse and build on the webpage. I am thinking there is a configuration issue or format issue. SO a blank file is more of a problem but would love a example format to build with. I installed winpress was unimpressed and removed it, so might be something to do and rebuild the apache files. I found this tip so will try it myself.
-
Reinstall fixed a few issues not the one that I am working on though. Overall still a good tip. – Chris Owen Nov 01 '20 at 07:44
ls /etc/apache2/sites-available/default
shows it exists. – Rinzwind May 26 '14 at 09:32