1

Topic: How to add non SSL vhost?

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: CentOS 6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue: ---
====
I add to my /etc/httpd/conf/httpd.conf

NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#
<VirtualHost *:80>
     ServerAdmin postmaster@mydomain.pl
     DocumentRoot /var/www/event.mydomain.pl/public_html
     ServerName event.mydomain.pl
     ErrorLog /var/www/event.mydomain.pl/error.log
     CustomLog /var/www/event.mydomain.pl/requests.log common
</VirtualHost>

I also create file /var/www/event.mydomain.pl/public_html/index.html

then I restart apache (without problem) and now iredmail works ok (roundcube, ssl itp) but when I try enter http://event.mydomain.pl then i was redirect to httpS://poczta.mydomain.pl/mail (to my roundcube), how can I repair this?

----

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

2

Re: How to add non SSL vhost?

What's the content in /var/www/event.mydomain.pl/public_html/index.html?

3 (edited by XnIcRaM 2015-12-04 15:02:49)

Re: How to add non SSL vhost?

<html>
  <head>
    <title>www.example.com</title>
  </head>
  <body>
    <h1>Success: You Have Set Up a Virtual Host</h1>
  </body>
</html>

I don't change nothing more than httpd.conf its fresh iredmail installation. When I create folder in /var/www/html example /var/www/html/test then I can open it by https://poczta.mydomain.pl/test/ but it works only through https when I try open by http (without SSL) then I got message: 404 The requested URL /test was not found on this server. Apache Server at poczta.mydomain.pl Port 80

4

Re: How to add non SSL vhost?

Does it work if you MOVE the web host settings into a new file under /etc/httpd/conf.d/? e.g. /etc/httpd/conf.d/event.mydomain.pl.conf. Restarting Apache service is required after this modification.