Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have this virtualhost file in sites-available and sites-enabled. My domain is redirecting back here but it is going to the wrong /var/www/dir/prod. My domain is now domain.com I just changed it in here. Can anyone give me any indication why this is not going to the right directory?
<VirtualHost *:8080>
ServerAdmin webmaster@localhost
ServerName dev.domain.com
ServerAlias test.domain.com

    DocumentRoot /var/www/sites/slap/dev
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/sites/slap/dev>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            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
    ErrorLog /dev/null

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

    CustomLog /dev/null combined

</VirtualHost>

<VirtualHost *:8080>
ServerAdmin webmaster@localhost
ServerName domain.com
ServerAlias www.domain.com

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

    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
    ErrorLog /dev/null

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

    CustomLog /dev/null combined

</VirtualHost>

share|improve this question
add comment

3 Answers

up vote 0 down vote accepted

Did you restart apache? Do the error logs say anything?

share|improve this answer
    
The restart worked. Thanks a bunch! –  mahle Nov 2 '10 at 16:39
add comment

Do you have a Listen statement for port 8080 in httpd.conf? If not that, could explain it (and the log won't display anything)

share|improve this answer
add comment

Try the command :

httpd -t -D DUMP_VHOSTS

(or maybe, depending on the way apache was packaged.. your use of sites-enabled suggests debian or ubuntu) :

APACHE_RUN_USER=www-data APACHE_RUN_GROUP=www-data apache2 -t -D DUMP_VHOSTS

this will show how the vhosts are defined and overlap (which vhost falls within which namevirtualhost config). This may show you what is going wrong.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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