i'm setting up an apache2 server based on debian squeeze. I want to serve multiple websites using multiple IPs. Some of them need a certificate (one certificate for every website).

Well, my server has 3 IPs (let's say, and

i've already set up multiple vhosts for the and IPs, one of them uses the ssl certificate

now, i use the following scenario. One of the folders being served is /home/apache/SITES. What i want is when a user hits to be redirected to (that serves /home/apache/SITES/one) and when he hits to be redirected to (that serves /home/apache/SITES/two)

So far i use this configuration.

<VirtualHost _default_>
        DocumentRoot /home/apache/SITES/default/htdocs

        Alias /mysite /home/apache/SITES/one

        <IfModule mod_rewrite.c>
        <IfModule mod_ssl.c>
                <Location /mysite>
                RewriteEngine on
                RewriteCond %{HTTPS} off
                RewriteRule ^(.*)$ https://%{HTTP_HOST}/mysite [R]

        <Directory /home/apache/SITES/one>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                DirectoryIndex index.php

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel error
        ErrorLog  /home/apache/SITES/logs/error.log
        CustomLog /home/apache/SITES/logs/access.log combined


but it doesn't seem to work. Firefox returns

The connection was reset
The connection to the server was reset while the page was loading.

any ideas?


  • What does the Apache error log say? – Andrew Schulman Dec 18 '11 at 11:52
  • 1
    nothing at all. neither the log of the virtual host, nor the main apache log – poscaman Dec 18 '11 at 11:53
  • what a bad choice of as example ip for a server :( – S19N Dec 18 '11 at 19:05

It seems that your server might not be listening on port 443. Do you also have virtual hosts configured for HTTPS? E.g.

Listen 443
    SSLCertificateKeyFile   ...
    SSLCertificateFile      ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.