1

Topic: Need to Re-Create /etc/apache2/sites-enabled/000-default

==== Required information ====
- iRedMail version (check /etc/iredmail-release):   0.9.6
- Linux/BSD distribution name and version:   Ubuntu 16.04  Desktop
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):   MySQL
- Web server (Apache or Nginx):  Apache2
- Manage mail accounts with iRedAdmin-Pro?  No
- Related log if you're reporting an issue:
====

This is so embarrassing.  I had been up for many hours trying to get Citadel stable (which I now believe is impossible) when I had the good fortune of finding iRedMail.  Then, for whatever reason that I can't recall now, I decided to delete /etc/apache2/sites-enabled/000-default.conf .

I know, I know.  FUBAR.

Can anyone help by providing the (generic) contents to this file so that I may re-create it (customizing to my installation, of course).

Your help would be greatly appreciated.  TYIA.

--Jim

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Need to Re-Create /etc/apache2/sites-enabled/000-default

Here ya go:

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
        Alias /log/ "/var/log/"
       <Directory "/var/log/">
           Options Indexes MultiViews FollowSymLinks
           AllowOverride None
           Order deny,allow
           Deny from all
           Allow from all
            Require all granted
       </Directory>
</VirtualHost>

Regards

3

Re: Need to Re-Create /etc/apache2/sites-enabled/000-default

Thanks Heeter.....do you know, is that content good as is?  Or do I have to edit it for my specific installation?

Again, thanks for your quick reply.


heeter wrote:

Here ya go:

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
        Alias /log/ "/var/log/"
       <Directory "/var/log/">
           Options Indexes MultiViews FollowSymLinks
           AllowOverride None
           Order deny,allow
           Deny from all
           Allow from all
            Require all granted
       </Directory>
</VirtualHost>

Regards

4

Re: Need to Re-Create /etc/apache2/sites-enabled/000-default

If the html files are located in the default "/var/www/html" folder, you will just need to add the following line with your domain name :

ServerName www.whateveryourdomainnameis.com

Add it just above the line "ServerAdmin webmaster@localhost"

Regards