Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running an apache webserver for a while now with a secure server. All traffic was rerouted to (example names). Now I want to add a second site for testing purposes on the same server called (no ssl for that one). My vhost.conf is below and is rerouting everything, even, to What is wrong with my conf???

NameVirtualHost *:80
<VirtualHost *:80>
    DocumentRoot /var/www-first/
    Redirect permanent /
<VirtualHost *:80>
    DocumentRoot /var/www-second/
    DirectoryIndex index.html index.php

NameVirtualHost *:443
<VirtualHost *:443>
    DocumentRoot /var/www-first/
    DirectoryIndex index.html index.php
    SSLEngine on
    SSLProtocol all -SSLv2
    SSLCertificateFile /etc/pki/tls/certs/
    SSLCertificateKeyFile /etc/pki/tls/private/
    SSLCertificateChainFile /etc/pki/tls/certs/intermediate.crt
share|improve this question

migrated from May 8 '13 at 6:30

This question came from our site for professional and enthusiast programmers.

Anyone out there who can help me? I thought I understood virtual hosting, but I'm really stuck here. Any suggestions are welcome. – Martijn Burger May 8 '13 at 13:22
Hmmm. Still looking for an answer. Anyone out there can spot the error???? – Martijn Burger May 16 '13 at 13:59
up vote 0 down vote accepted

Okay. Nothing wrong with this apache config. The www-first and www-second were rerouting to the right application after all. It was just that it was running the same application which both looked at the same database.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .