LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-13-2012, 02:42 PM   #1
onthefritz
Member
 
Registered: Dec 2005
Location: Colorado
Distribution: Ubuntu, RHEL, openSUSE
Posts: 105

Rep: Reputation: 19
apache index.pl not opening in browser


I have OTRS Help Desk installed on an Ubuntu 11.04 virtual machine (VMware). OTRS functions just fine, but to get to the web interface I have to open http://x.x.x.x/index.pl instead of just going to http://x.x.x.x. It's starting to drive me nuts. I even have DirectoryIndex index.pl in the otrs.conf file for apache. I'm starting to go out of my mind... lol

Apache logs don't give me much...
Code:
[Fri Apr 13 13:28:22 2012] [error] [client 10.100.135.127] Attempt to serve directory: /opt/otrs/bin/cgi-bin/
And syslog gives me nothing.

Here is the otrs.conf file located in /etc/apache2/sites-available (there is a link from sites-enabled)

Code:
ServerName *:80
<virtualHost *:80>
    ServerAdmin me@stuff.com
    DocumentRoot /

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
# agent, admin and customer frontend
ScriptAlias / "/opt/otrs/bin/cgi-bin/"
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"

# activate this if you are using an Oracle database
#SetEnv ORACLE_HOME /path/to/your/oracle/
#SetEnv ORACLE_SID YOUR_SID
#SetEnv NLS_LANG AMERICAN_AMERICA.UTF8
#SetEnv NLS_DATE_FORMAT 'YYYY-MM-DD HH24:MI:SS'

# if mod_perl is used
<IfModule mod_perl.c>

    # load all otrs modules
    Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl

    # Apache::Reload - Reload Perl Modules when Changed on Disk
    PerlModule Apache2::Reload
    PerlInitHandler Apache2::Reload
    PerlModule Apache2::RequestRec

    # set mod_perl2 options
    <Location />
#        ErrorDocument 403 /otrs/customer.pl
        ErrorDocument 403 /otrs/index.pl
        DirectoryIndex index.pl
        SetHandler  perl-script
    </Location>

   <LocationMatch /.*\.pl>
    Options +ExecCGI
    SetHandler cgi-script
    Order allow,deny
    Allow from all

    <IfModule mod_perl.c>
      SetHandler perl-script
      PerlHandler ModPerl::Registry
      PerlOptions +ParseHeaders
      PerlOptions +SetupEnv
    </IfModule>

  </LocationMatch>

</IfModule>

# directory settings
<Directory "/opt/otrs/bin/cgi-bin/">
    AllowOverride None
    Options +ExecCGI -Includes
    Order allow,deny
    Allow from all
</Directory>
<Directory "/opt/otrs/var/httpd/htdocs/">
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_headers.c>
    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css-cache">
        <FilesMatch "\.(css|CSS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>

    <Directory "/opt/otrs/var/httpd/htdocs/js/js-cache">
        <FilesMatch "\.(js|JS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>
</IfModule>

</VirtualHost>
# MaxRequestsPerChild (so no apache child will be to big!)
MaxRequestsPerChild 4000
 
Old 04-13-2012, 09:04 PM   #2
ALB
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Rep: Reputation: Disabled
Try putting that in your <Directory> setting rather than in <location>:


Code:
<Directory "/opt/otrs/bin/cgi-bin/">
    AllowOverride None
    Options +ExecCGI -Includes
    Order allow,deny
    Allow from all
    DirectoryIndex index.pl
</Directory>
 
Old 04-16-2012, 07:58 AM   #3
onthefritz
Member
 
Registered: Dec 2005
Location: Colorado
Distribution: Ubuntu, RHEL, openSUSE
Posts: 105

Original Poster
Rep: Reputation: 19
That is what I tried a while a ago but I just tested it again and no go. The file permissions are correct, I just don't understand why it doesn't like it. The image attached is what I get when I try to go to the page.

OTF
Attached Thumbnails
Click image for larger version

Name:	ScreenShot056.jpg
Views:	383
Size:	29.2 KB
ID:	9451  
 
Old 04-18-2012, 04:47 PM   #4
onthefritz
Member
 
Registered: Dec 2005
Location: Colorado
Distribution: Ubuntu, RHEL, openSUSE
Posts: 105

Original Poster
Rep: Reputation: 19
Got it to work...

I had to remove this to get to a forbidden page instead of a 404.
Code:
<Location />
#        ErrorDocument 403 /otrs/customer.pl
        ErrorDocument 403 /otrs/index.pl
        DirectoryIndex index.pl
        SetHandler  perl-script
    </Location>
And

Code:
ScriptAlias / "/opt/otrs/bin/cgi-bin/"

I added ServerName and fixed Document Root to get around the forbidden. And we are good.

Code:
ServerName *:80

DocumentRoot /opt/otrs/bin/cgi-bin

Here is the fully functional config.
Code:
# --
# added for OTRS (http://otrs.org/)
# $Id: apache2-httpd.include.conf,v 1.25 2011/11/05 17:39:09 mb Exp $
# Last Modified 4/18/2012 by Me
# --
<VirtualHost *:80>
    ServerAdmin Stuff@me.moc
    ServerName *:80
    DocumentRoot /opt/otrs/bin/cgi-bin

<Directory /opt/otrs/bin/cgi-bin/>
    Options FollowSymLinks
    AllowOverride None
    DirectoryIndex index.pl
</Directory>
# agent, admin and customer frontend
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"

# if mod_perl is used
<IfModule mod_perl.c>

    # load all otrs modules
    Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl

    # Apache::Reload - Reload Perl Modules when Changed on Disk
    PerlModule Apache2::Reload
    PerlInitHandler Apache2::Reload
    PerlModule Apache2::RequestRec

 # activate CGI/mod_perl for perl files
  <LocationMatch /.*\.pl>
    Options +ExecCGI
    SetHandler cgi-script
    Order allow,deny
    Allow from all

    <IfModule mod_perl.c>
      SetHandler perl-script
      PerlHandler ModPerl::Registry
      PerlOptions +ParseHeaders
      PerlOptions +SetupEnv
    </IfModule>

  </LocationMatch>

</IfModule>

# directory settings
<Directory "/opt/otrs/bin/cgi-bin/">
    AllowOverride None
    Options +ExecCGI -Includes
    Order allow,deny
    Allow from all
</Directory>
<Directory "/opt/otrs/var/httpd/htdocs/">
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_headers.c>
    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css-cache">
        <FilesMatch "\.(css|CSS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>

    <Directory "/opt/otrs/var/httpd/htdocs/js/js-cache">
        <FilesMatch "\.(js|JS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>
</IfModule>

</VirtualHost>
# MaxRequestsPerChild (so no apache child will be to big!)
MaxRequestsPerChild 4000
Server info:
Ubuntu 11.04
VMware Virtual Machine
512M of RAM
1CPU

now to setup customer and public virtual hosts.... mwahaha (I will post up the configs once I get everything working...

OTF
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is the index.html file that displays in the browser in mac os x leopard located baronobeefdip Other *NIX 1 10-16-2011 10:29 PM
Apache 404 index.php not Found but index.php exists at document root mark84 Linux - Server 20 07-27-2008 01:55 AM
apache index.html doesn't show up but index.php do zoffmann Linux - Server 5 01-28-2008 03:53 PM
Browser cannot load Apache index.html tekmann33 General 7 02-19-2007 03:57 PM
Trouble opening index.php file to install eZ publish jedson Linux - Software 2 11-01-2004 07:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration