1

The vhosts are managed with the puppetlabs-apache module and I can not access the website with www but I can without it. When i use www I get a blank page and there are no errors an any logs and non www works fine.

Here is the conf file for the website

# ************************************
# Vhost template in module puppetlabs-apache
# Managed by Puppet
# ************************************

<VirtualHost *:80>
  ServerName www.example.com

  ## Vhost docroot
  DocumentRoot "/var/www/vhosts/example.com/httpdocs"



  ## Directories, there should at least be a declaration for /var/www/vhosts/example.com/httpdocs


  <Directory "/var/www/vhosts/example.com/httpdocs">
    AllowOverride ALL
    Order allow,deny
    Allow from all
    AddHandler x-httpd-php .php .php3 .php4 .php5
    suPHP_UserGroup jasonnarog jasonnarog
  </Directory>

  ## Load additional static includes


  ## Logging
  ErrorLog "/var/www/vhosts/example.com/logs/www.example.com_error.log"
  ServerSignature Off
  CustomLog "/var/www/vhosts/example.com/logs/www.example.com_access.log" combined




  ## Server aliases
  ServerAlias example.com
  suPHP_AddHandler x-httpd-php
  suPHP_Engine on
</VirtualHost>

I tried switching the alias and servername but get the same result.

4
  • Are both www.example.com and example.com (without 'www') resolving to the same IP address?
    – Sreeraj
    Dec 15, 2014 at 4:59
  • yes there are in my hosts file atm.
    – Yamiko
    Dec 15, 2014 at 5:02
  • Did you check it with different browsers? Is there anything in your code that is hostname specific?
    – Sreeraj
    Dec 15, 2014 at 5:08
  • Another debugging strategy is to access the domains using wget -SO/dev/null <domain>, see if there are obvious signs for problems in the different response headers. Dec 15, 2014 at 16:23

0

You must log in to answer this question.

Browse other questions tagged .