PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, February 28, 2022

[FIXED] Resolve Error default site does not exist after update to Ubuntu 13.10 and apache 2.4

 February 28, 2022     apache2, lamp, ubuntu-13.10, virtualhost     No comments   

Issue

I updated my ubuntu lately, I wanted to program in my Ubuntu 13.10, and was setting up apache2, and every time I run the command:

sudo a2ensite default

I get the following error:

Error default site does not exist

how can I fix this issue?


Solution

To fix this and any other virtual host running on apache 2.4 I needed to set the

default (and any other virtual host you have)

as

default.conf (add .conf any virtual host you have already set)

Enter the console (terminal) and type the following commands:

sudo mv /etc/apache2/sites-available/default /etc/apache2/sites-available/default.conf
sudo a2ensite default

And we will get the following:

Enabling site default. To activate the new configuration, I needed to run: service apache2 reload

now run:

service apache2 reload

and done.

or create the default.conf file if you don't have it and this is what it should contain by default:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>


Answered By - Waqleh
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing