Apache config woes

Hello,

I am trying to serve rt from “/rt”. I have read the web_deployment.pod and
I thought I’d configured apache correctly but I still cant get rt to start.
The apache error log says “File does not exist: /var/www/rt”.

Here’s my apache config:

<VirtualHost *:80>
ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>

<VirtualHost *:80>
### Optional apache logs for RT
# Ensure that your log rotation scripts know about these files
# ErrorLog /opt/rt4/var/log/apache2.error
#TransferLog /opt/rt4/var/log/apache2.access
# LogLevel debug

    AddDefaultCharset UTF-8

    Alias /rt/NoAuth/images/ /opt/rt4/share/html/NoAuth/images/
    ScriptAlias /rt/ /opt/rt4/sbin/rt-server.fcgi/

    DocumentRoot /var/www
    <Location /rt>
        Order allow,deny
        Allow from all

        Options +ExecCGI
        AddHandler fcgid-script fcgi
    </Location>
</VirtualHost>

Any help would be really appreciated.

Regards, Jim

I believe RT installs itself in /opt/rt4/ ?

This is houw my Apache config looks atm:

<VirtualHost *:80>
ErrorLog /opt/rt4/var/log/apache2.error
TransferLog /opt/rt4/var/log/apache2.access

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

<VirtualHost *:443>
ErrorLog /opt/rt4/var/log/apache2.error
TransferLog /opt/rt4/var/log/apache2.access

LogLevel debug

AddDefaultCharset UTF-8

DocumentRoot “/opt/rt4/share/html”

Order allow,deny
Allow from all

SetHandler perl-script
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /opt/rt4/sbin/rt-server


use Plack::Handler::Apache2;
Plack::Handler::Apache2->preload(“/opt/rt4/sbin/rt-server”);

SSLEngine on
SSLCertificateFile /etc/ssl/certs/***.pem

We’re hosting it via SSL, the port 80 part makes sure everything is
redirected to 443 (while keeping the URL in tact).

– Bart2011/11/3 Jim T jimmers.inbox@gmail.com

Hello,

I am trying to serve rt from “/rt”. I have read the web_deployment.pod and
I thought I’d configured apache correctly but I still cant get rt to start.
The apache error log says “File does not exist: /var/www/rt”.

Here’s my apache config:

<VirtualHost *:80>
ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>

<VirtualHost *:80>
### Optional apache logs for RT
# Ensure that your log rotation scripts know about these files
# ErrorLog /opt/rt4/var/log/apache2.error
#TransferLog /opt/rt4/var/log/apache2.access
# LogLevel debug

    AddDefaultCharset UTF-8

    Alias /rt/NoAuth/images/ /opt/rt4/share/html/NoAuth/images/
    ScriptAlias /rt/ /opt/rt4/sbin/rt-server.fcgi/

    DocumentRoot /var/www
    <Location /rt>
        Order allow,deny
        Allow from all

        Options +ExecCGI
        AddHandler fcgid-script fcgi
    </Location>
</VirtualHost>

Any help would be really appreciated.

Regards, Jim


RT Training Sessions (http://bestpractical.com/services/training.html)

  • Barcelona, Spain — November 28 & 29, 2011

Hello,

I am trying to serve rt from “/rt”. I have read the web_deployment.pod
and I thought I’d configured apache correctly but I still cant get rt
to start. The apache error log says “File does not exist: /var/www/rt”.

Here’s my apache config:

<VirtualHost *:80>
ServerAdmin webmaster@localhost

    DocumentRoot /var/www
Options FollowSymLinks AllowOverride None Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

<Directory “/usr/lib/cgi-bin”>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"

<Directory “/usr/share/doc/”>
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 http://127.0.0.0/255.0.0.0
::1/128


<VirtualHost *:80>
### Optional apache logs for RT
# Ensure that your log rotation scripts know about these files
# ErrorLog /opt/rt4/var/log/apache2.error
#TransferLog /opt/rt4/var/log/apache2.access
# LogLevel debug

    AddDefaultCharset UTF-8

    Alias /rt/NoAuth/images/ /opt/rt4/share/html/NoAuth/images/
    ScriptAlias /rt/ /opt/rt4/sbin/rt-server.fcgi/

    DocumentRoot /var/www

Alias /rt “/opt/rt4/share/html”

I think this is the line your missing.

-Matt

I am trying to serve rt from “/rt”. I have read the web_deployment.pod
and I thought I’d configured apache correctly but I still cant get rt
to start. The apache error log says “File does not exist: /var/www/rt”.

Untested, but on a hunch try changing the ScriptAlias line to this:

 ScriptAlias /rt /opt/rt4/sbin/rt-server.fcgi/

Note the lack of a trailing slash after /rt.On 11/03/2011 20/20 Lab wrote:

Alias /rt “/opt/rt4/share/html”

I think this is the line your missing.

-Matt

I don’t think so. That’s what the ScriptAlias line is for.

Thomas

The trailing slash was at fault :slight_smile:

Thank you Thomas, and to the other responders.

Regards, JimOn Thu, Nov 3, 2011 at 3:48 PM, Thomas Sibley trs@bestpractical.com wrote:

On 11/03/2011 Jim T wrote:

I am trying to serve rt from “/rt”. I have read the web_deployment.pod
and I thought I’d configured apache correctly but I still cant get rt
to start. The apache error log says “File does not exist: /var/www/rt”.

Untested, but on a hunch try changing the ScriptAlias line to this:

ScriptAlias /rt /opt/rt4/sbin/rt-server.fcgi/

Note the lack of a trailing slash after /rt.

On 11/03/2011 20/20 Lab wrote:

Alias /rt “/opt/rt4/share/html”

I think this is the line your missing.

-Matt

I don’t think so. That’s what the ScriptAlias line is for.

Thomas


RT Training Sessions (http://bestpractical.com/**services/training.htmlhttp://bestpractical.com/services/training.html
)

  • Barcelona, Spain November 28 & 29, 2011