You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Arnold <ca...@electrichendrix.com> on 2012/03/10 20:42:22 UTC
[users@httpd] Directory Setting Issues, i believe(kind of long)
Apache 2.2.12 on SLES11 SP2. I have a couple of vhosts; the one i am concerned about is teknerds.conf. In teknerds.conf i have some rewrite rules (thanks Yehuda):
RewriteEngine On
RewriteRule ^/ifolder(.*) https://%{HTTP_HOST}/ifolder/ [L]
RewriteRule ^/admin(.*) https://%{HTTP_HOST}/admin/ [L]
to access some file services on the server (http://teknerds.net/ifolder).
I also have a install of OTRS (ticketing system) written in perl(http://teknerds.net/otrs/customer.pl). In order to make this easier for clients to get to, i have made otrs accessible by http://helpdesk.teknerds.net by doing this:
making a new vhost.conf called helpdesk.teknerds.conf and adding this to that vhost.conf:
DocumentRoot /opt/otrs/bin/cgi-bin/
and adding this to the otrs.conf file which is in /etc/apache2/conf.d:
# agent, admin and customer frontend
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
Alias / "/opt/otrs/bin/cgi-bin/"
this use to be:
# agent, admin and customer frontend
ScriptAlias / "/opt/otrs/bin/cgi-bin/"
Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
notice it is flipped and "Script" is removed.
I also commented out the location otrs.conf:
# set mod_perl2 options
# <Location /otrs>
# ErrorDocument 403 /otrs/customer.pl
# ErrorDocument 403 /otrs/index.pl
# SetHandler perl-script
# PerlResponseHandler ModPerl::Registry
# Options +ExecCGI
# PerlOptions +ParseHeaders
# PerlOptions +SetupEnv
# Order allow,deny
# Allow from all
# </Location>
and then entered some of the commented out info from location otrs.conf into the otrs.conf directory:
# directory settings
<Directory "/opt/otrs/bin/cgi-bin/">
AllowOverride None
Options +ExecCGI -Includes
Order allow,deny
Allow from all
ErrorDocument 403 /otrs/customer.pl
DirectoryIndex customer.pl
AddHandler perl-script .pl .cgi
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
</Directory>
Now, i can access http://helpdesk.teknerds.net and get the customer login page of the ticketing system like i want to. The problem is, i can no longer access http://teknerds.net/ifolder (and a few other http://teknerds.net/(whatever).
I know this is long but i wanted to give all the info i could and what exactly i did before the other stuff broke. How do i access the other http://xx.xxx/(whatevers) and http://helpdesk.xx.xxx?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Directory Setting Issues, i believe(kind of long)
Posted by Chris Arnold <ca...@electrichendrix.com>.
Actually, everything now points to the customer login page which is not what I want....There is a main site at http://teknerds.net
Sent from my iPhone
On Mar 10, 2012, at 2:42 PM, Chris Arnold <ca...@electrichendrix.com> wrote:
> Apache 2.2.12 on SLES11 SP2. I have a couple of vhosts; the one i am concerned about is teknerds.conf. In teknerds.conf i have some rewrite rules (thanks Yehuda):
> RewriteEngine On
> RewriteRule ^/ifolder(.*) https://%{HTTP_HOST}/ifolder/ [L]
> RewriteRule ^/admin(.*) https://%{HTTP_HOST}/admin/ [L]
> to access some file services on the server (http://teknerds.net/ifolder).
>
> I also have a install of OTRS (ticketing system) written in perl(http://teknerds.net/otrs/customer.pl). In order to make this easier for clients to get to, i have made otrs accessible by http://helpdesk.teknerds.net by doing this:
>
> making a new vhost.conf called helpdesk.teknerds.conf and adding this to that vhost.conf:
>
> DocumentRoot /opt/otrs/bin/cgi-bin/
>
> and adding this to the otrs.conf file which is in /etc/apache2/conf.d:
>
> # agent, admin and customer frontend
> Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
> Alias / "/opt/otrs/bin/cgi-bin/"
>
> this use to be:
>
> # agent, admin and customer frontend
> ScriptAlias / "/opt/otrs/bin/cgi-bin/"
> Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
> notice it is flipped and "Script" is removed.
>
> I also commented out the location otrs.conf:
> # set mod_perl2 options
> # <Location /otrs>
> # ErrorDocument 403 /otrs/customer.pl
> # ErrorDocument 403 /otrs/index.pl
> # SetHandler perl-script
> # PerlResponseHandler ModPerl::Registry
> # Options +ExecCGI
> # PerlOptions +ParseHeaders
> # PerlOptions +SetupEnv
> # Order allow,deny
> # Allow from all
> # </Location>
> and then entered some of the commented out info from location otrs.conf into the otrs.conf directory:
>
> # directory settings
> <Directory "/opt/otrs/bin/cgi-bin/">
> AllowOverride None
> Options +ExecCGI -Includes
> Order allow,deny
> Allow from all
> ErrorDocument 403 /otrs/customer.pl
> DirectoryIndex customer.pl
> AddHandler perl-script .pl .cgi
> PerlResponseHandler ModPerl::Registry
> PerlOptions +ParseHeaders
> </Directory>
>
> Now, i can access http://helpdesk.teknerds.net and get the customer login page of the ticketing system like i want to. The problem is, i can no longer access http://teknerds.net/ifolder (and a few other http://teknerds.net/(whatever).
> I know this is long but i wanted to give all the info i could and what exactly i did before the other stuff broke. How do i access the other http://xx.xxx/(whatevers) and http://helpdesk.xx.xxx?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Directory Setting Issues, i believe(kind of long)
Posted by Chris Arnold <ca...@electrichendrix.com>.
On Mar 11, 2012, at 2:46 PM, Yehuda Katz <ye...@ymkatz.net> wrote.
> I still do not want the customer to have to enter the customer.pl part.
> Then the easiest solution might be to add
> DirectoryIndex customer.pl
I put that in the teknerds.conf vhost file, in the directory directive (under the scriptalias entry) but still got the same error. Where exactly does that go?
Re: [users@httpd] Directory Setting Issues, i believe(kind of long)
Posted by Yehuda Katz <ye...@ymkatz.net>.
On Sun, Mar 11, 2012 at 2:34 PM, Chris Arnold
<ca...@electrichendrix.com>wrote:
> # agent, admin and customer frontend
>> Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
>> Alias / "/opt/otrs/bin/cgi-bin/"
>>
> This says to make an alias for every vhost from /
> to "/opt/otrs/bin/cgi-bin/"
> You need to put that all in the new vhost you created only.
>
> I still do not want the customer to have to enter the customer.pl part.
>
Then the easiest solution might be to add
DirectoryIndex customer.pl
- Y
Re: [users@httpd] Directory Setting Issues, i believe(kind of long)
Posted by Chris Arnold <ca...@electrichendrix.com>.
On Mar 11, 2012, at 12:55 AM, Yehuda Katz <ye...@ymkatz.net> wrote:
> On Sat, Mar 10, 2012 at 2:42 PM, Chris Arnold <ca...@electrichendrix.com> wrote:
> making a new vhost.conf called helpdesk.teknerds.conf and adding this to that vhost.conf:
>
> DocumentRoot /opt/otrs/bin/cgi-bin/
>
> and adding this to the otrs.conf file which is in /etc/apache2/conf.d:
>
> # agent, admin and customer frontend
> Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
> Alias / "/opt/otrs/bin/cgi-bin/"
> This says to make an alias for every vhost from / to "/opt/otrs/bin/cgi-bin/"
> You need to put that all in the new vhost you created only.
I put that in the helpdesk.vhost.conf and teknerds.net is now a directory listing of files in the document root (along with helpdesk.teknerds.net). What I did do, that worked, was change the script alias in otrs to helpdesk/, then in the teknerds.conf vhost, add scriptalias /helpdesk/ "/path/to/otrs/cgi-bin/". Restart apache and now teknerds.net/helpdesk/customer.pl takes you to the customer login page. I still do not want the customer to have to enter the customer.pl part. In the first example I posted, you could set the landing page in the location directive. Is there a way to not have the customer type in customer.pl? When I go to teknerds.net!helpdesk, I get this in the error log:
attempt to invoke directory as a script: /opt/otrs/bin/cgi-bin/
Re: [users@httpd] Directory Setting Issues, i believe(kind of long)
Posted by Yehuda Katz <ye...@ymkatz.net>.
On Sat, Mar 10, 2012 at 2:42 PM, Chris Arnold
<ca...@electrichendrix.com>wrote:
> making a new vhost.conf called helpdesk.teknerds.conf and adding this to
> that vhost.conf:
>
> DocumentRoot /opt/otrs/bin/cgi-bin/
>
> and adding this to the otrs.conf file which is in /etc/apache2/conf.d:
>
> # agent, admin and customer frontend
> Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
> Alias / "/opt/otrs/bin/cgi-bin/"
>
This says to make an alias for every vhost from /
to "/opt/otrs/bin/cgi-bin/"
You need to put that all in the new vhost you created only.
- Y