HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Internar error after adding *.conf (http://www.howtoforge.com/forums/showthread.php?t=61233)

SiByte 30th March 2013 22:51

Internar error after adding *.conf
 
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.

8omas 30th March 2013 23:57

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

SiByte 31st March 2013 07:46

not work :(

8omas 31st March 2013 13:34

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

SiByte 1st April 2013 09:08

yes but I don't find solution

JeffryL 1st April 2013 10:33

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>


SiByte 1st April 2013 11:06

Works, error 500 go away :)

I now get error 404

after I add
Code:

Alias /roundcube/ /var/www/roundcube/
I get error 403

JeffryL 1st April 2013 12:09

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

What error messages appear in your error.log?

SiByte 1st April 2013 12:20

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>


JeffryL 1st April 2013 12:50

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

How did you install roundcube?

The code above works with a normal apt-get install roundcube...


All times are GMT +2. The time now is 04:32.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.