Wednesday, December 07, 2005

Ensim Webppliance - Domain Resolving to Admin Panel - Domain not working

Sometimes a domain on ensim starts going to the webppliance admin panel instead of the domain. Here we will investigate that case.

  • Make sure the site exists
  • #Check
    tail -f /var/log/httpd/access_log
  • # Check
    tail -f /var/log/httpd/error_log
  • # Find
    sitelookup -s siteX
    sitelookup -d
  • Verify /etc/httpd/conf/virtual/site12 exists. If not create it. A demo file (not for production) is provided below for reference

    DocumentRoot /home/virtual/site12/fst/var/www/html
    RewriteEngine on
    User admin12
    Group admin12
    Redirect /admin
    Redirect /user
    RewriteRule ^/~([^/]+)(.*) /users/$1$2 [PT]
    AliasMatch ^/users/([^/]+)/?(.*) /home/virtual/site12/fst/home/$1/public_html/$2

    Allow from all
    AllowOverride All
    Order allow,deny

    Allow from all
    AllowOverride All
    Order allow,deny

    SetEnv SITE_ROOT /home/virtual/site12/fst
    SetEnv SITE_HTMLROOT /home/virtual/site12/fst/var/www/html

    # need to set php on explicitly (PR 24077).
    # using php_flag so site can override.
    php_flag engine on

    Include /etc/httpd/conf/site12

    ServerAlias *
    RewriteEngine On
    RewriteCond %{HTTP_HOST} .* [NC]
    RewriteCond %{HTTP_HOST} ! [NC]
    RewriteRule ^/(.*)$ /home/virtual/site12/fst/var/www/html/%{HTTP_HOST}/$1 [L]

  • #Now restart apache
    service httpd restart