Internar error after adding *.conf

Discussion in 'Installation/Configuration' started by SiByte, Mar 30, 2013.

  1. SiByte

    SiByte New Member

    Hi!

    I have a problem with my server. I add a .conf file in /etc/apache2/conf.d/ and I get Internal error.

    .conf file
    Code:
    # RoundCube alias and redirect functions
    Alias /roundcube /var/www/roundcube
    <Directory /var/www/roundcube>
      Options +FollowSymLinks
      # This is needed to parse /var/www/roundcube/.htaccess. See its
      # content before setting AllowOverride to None.
      AllowOverride All
      order allow,deny
      allow from all
    </Directory>
    
    <IfModule mod_rewrite.c>
      <IfModule mod_ssl.c>
        <Location /roundcube>
          RewriteEngine on
          RewriteCond %{HTTPS} !^on$ [NC]
          RewriteRule . https://domain.com:8080/roundcube/  [L]
        </Location>
      </IfModule>
    </IfModule>
    
    in log files
    Code:
    [Sat Mar 30 22:35:19 2013] [error] [client 193.177.153.156] SoftException in Application.cpp:221: File "/var/www/roundcube/index.php" is not in document root of Vhost "/var/www/ispconfig/"
    [Sat Mar 30 22:35:19 2013] [error] [client 193.177.153.156] Premature end of script headers: index.php
    
    Where is the problem? I use the same .conf file on old server with old ISPConfig 3.
     
  2. 8omas

    8omas Member HowtoForge Supporter

    Have a look at this
    http://www.howtoforge.com/forums/showthread.php?t=60746

    Try pasting :

    <IfModule mod_php5.c>
    AddType application/x-httpd-php .php
    php_flag magic_quotes_gpc Off
    php_flag track_vars On
    php_admin_flag allow_url_fopen Off
    php_value include_path .:/usr/share/php:/usr/share/pear
    php_admin_value upload_tmp_dir /var/lib/roundcube/temp
    php_admin_value open_basedir /usr/share/php:/usr/lib/roundcube:/etc/roundcube:/usr/share/roundcube:/var/lib/roundcube:/var/log/roundcube
    php_flag register_globals off
    </IfModule>

    below the contents of your file
     
    Last edited: Mar 31, 2013
  3. SiByte

    SiByte New Member

    not work :(
     
    Last edited: Mar 31, 2013
  4. 8omas

    8omas Member HowtoForge Supporter

    Did you read the thread?
    There are some suggestions in there.
     
  5. SiByte

    SiByte New Member

    yes but I don't find solution
     
  6. JeffryL

    JeffryL Member

    This works for me over port 80:

    Code:
    <IfModule mod_rewrite.c>
      <IfModule mod_ssl.c>
        <Location /webmail>
          RewriteEngine on
          RewriteCond %{HTTPS} !^on$ [NC]
          RewriteRule . https://%{HTTP_HOST}:8080%{REQUEST_URI}  [L]
        </Location>
      </IfModule>
    
    <IfModule mod_rewrite.c>
      <IfModule mod_ssl.c>
        <Location /roundcube>
          RewriteEngine on
          RewriteCond %{HTTPS} !^on$ [NC]
          RewriteRule . https://%{HTTP_HOST}:8080%{REQUEST_URI}  [L]
        </Location>
      </IfModule>
    
    <IfModule mod_php5.c>
    AddType application/x-httpd-php .php
    php_flag magic_quotes_gpc Off
    php_flag track_vars On
    php_admin_flag allow_url_fopen Off
    php_value include_path .:/usr/share/php:/usr/share/pear
    php_admin_value upload_tmp_dir /var/lib/roundcube/temp
    php_admin_value open_basedir /usr/share/php:/usr/lib/roundcube:/etc/roundcube:/usr/share/roundcube:/var/lib/roundcube:/var/log/roundcube
    php_flag register_globals off
    </IfModule>
     
    Last edited: Apr 1, 2013
  7. SiByte

    SiByte New Member

    Works, error 500 go away :)

    I now get error 404

    after I add
    Code:
    Alias /roundcube/ /var/www/roundcube/
    I get error 403
     
  8. JeffryL

    JeffryL Member

    Do you get a 404 when approaching /webmail or /roundcube?

    What error messages appear in your error.log?
     
  9. SiByte

    SiByte New Member

    both when I dont't use Alias

    Error.log
    Code:
    [Mon Apr 01 12:15:36 2013] [error] [client 193.77.143.146] File does not exist: /var/www/ispconfig/roundcube
    [Mon Apr 01 12:15:36 2013] [error] [client 193.77.143.146] File does not exist: /var/www/ispconfig/roundcube
    [Mon Apr 01 12:15:40 2013] [error] [client 193.77.143.146] File does not exist: /var/www/ispconfig/webmail
    
    roundcube.conf
    Code:
    Alias /roundcube /var/www/roundcube
    
    <IfModule mod_rewrite.c>
      <IfModule mod_ssl.c>
        <Location /webmail>
          RewriteEngine on
          RewriteCond %{HTTPS} !^on$ [NC]
          RewriteRule . https://server.wx.si:1010/roundcube  [L]
        </Location>
      </IfModule>
    
    <IfModule mod_rewrite.c>
      <IfModule mod_ssl.c>
        <Location /roundcube>
          RewriteEngine on
          RewriteCond %{HTTPS} !^on$ [NC]
          RewriteRule . https://server.wx.si:1010/roundcube  [L]
        </Location>
      </IfModule>
    
    <IfModule mod_php5.c>
    AddType application/x-httpd-php .php
    php_flag magic_quotes_gpc Off
    php_flag track_vars On
    php_admin_flag allow_url_fopen Off
    php_value include_path .:/usr/share/php:/usr/share/pear
    php_admin_value upload_tmp_dir /var/lib/roundcube/temp
    php_admin_value open_basedir /usr/share/php:/usr/lib/roundcube:/etc/roundcube:/usr/share/roundcube:/var/lib/roundcube:/var/log/roundcube
    php_flag register_globals off
    </IfModule>
    
     
  10. JeffryL

    JeffryL Member

    The 404 refers to /var/www/ispconfig...

    How did you install roundcube?

    The code above works with a normal apt-get install roundcube...
     
    Last edited: Apr 1, 2013
  11. 8omas

    8omas Member HowtoForge Supporter

    Last edited: Apr 1, 2013
  12. SiByte

    SiByte New Member

    I install in /var/www/roundcube manually
     
  13. 8omas

    8omas Member HowtoForge Supporter

    Try to make the conf file similar to the one posted in the link I posted in the previous post.
    Make sure to use the correct paths (as you did the manual install)
     
  14. SiByte

    SiByte New Member

    Working :)

    Thank you!
     

Share This Page