apache virtual hosts breaking apache

Discussion in 'OS X Mavericks (10.9)' started by ddragas, Nov 30, 2013.

  1. ddragas macrumors newbie

    Joined:
    Nov 30, 2013
    #1
    Hi all

    I've got problem on apache server. Problem manifests when virtual hosts file is included in apache configuration.

    If I remove include of virtual hosts file apache returns words "It works!"

    First I had symlink on path /www and real path is on another drive. Configuration did not work.

    Later I've removed symlink ad still no success.

    If virtual hosts file is included I get blank page and nothing is written apache in logs

    this is configuration of virtual host I've used on 10.6.7 and it worked without problems.

    Code:
    <VirtualHost *:80>
        DocumentRoot "/www/mysite"
        ServerName domain.local
        ErrorLog "/private/var/log/apache2/mysite.local-error_log"
        CustomLog "/private/var/log/apache2/mysite.local-access_log" common
    	<Directory /www/mysite>
    		allow from all
    		Options +Indexes
    	</Directory>    
    </VirtualHost>
    
    Please help me to get this working.

    Thank you in advance

    Kind regards

    ddragas
     
  2. cerberusss macrumors 6502a

    cerberusss

    Joined:
    Aug 25, 2013
    Location:
    The Netherlands
    #2
    Why is servername set to domain.local?

    My vhost config looks like this:
    Code:
    <VirtualHost *:80>
        ServerName example.com
        ServerAlias www.example.com
        DocumentRoot /var/www/example.com
        <Directory /var/www/example.com>
            AllowOverride all
        </Directory>
    </VirtualHost>
    Also, is that directory /www/mysite readable for the server? And can the server write to its logs? Turn up the logging output by changing the LogLevel parameter:
    http://httpd.apache.org/docs/2.2/mod/core.html#loglevel
     

Share This Page