1

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.

user3345331
  • 695
  • 2
  • 7
  • 13
  • Which version of Apache are you using? The config files have changed between versions 2.2 and 2.4, as the article states. The current Apache version would be 2.4.7. – Jos May 26 '14 at 09:25
  • i am using same apache 2.4.7 – user3345331 May 26 '14 at 09:31
  • Did you disable the default site perhaps? Please confirm ls /etc/apache2/sites-available/default shows it exists. – Rinzwind May 26 '14 at 09:32
  • 1
    Duplicate of http://askubuntu.com/questions/386382/cannot-find-etc-apache2-sites-available-default-when-configuring-apache. – Jos May 26 '14 at 09:33

3 Answers3

1

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.

fossfreedom
  • 172,746
  • thanks for help @raj_praveen but this file is also blank – user3345331 May 26 '14 at 10:09
  • 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
0

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.

  • 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
0

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.