Apache Server configuration support - Trying to alias directory paths?

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > April 2004 > Trying to alias directory paths?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Trying to alias directory paths?
DesignGuy

2004-04-21, 4:33 pm

I'm in the process of switching from a shared FreeBSD server to a dedicated
RedHat server running Plesk v7.02 control panel. I have many php and perl
scripts that use the server path to files and directories. Since the paths
differ between servers I would like to set up aliases to prevent having to
go in and change the scripts.

For example I would need any reference to /usr/local/etc/httpd/cgi-bin/ in a
PHP or PERL script to point to /home/httpd/vhosts/domain.com/cgi-bin/

I believe this could have been done on the old server by putting either an
Alias or ScriptAlias directive in the httpd.conf. But on the new server I
have an /etc/httpd/conf/httpd.conf, plus an httpd.include and vhost.conf for
each domain in the /home/httpd/vhosts/domain.com/conf/ directory.

What code should go in which file? I've tried several combinations and can't
get them to work....





Martin Uruz

2004-04-22, 2:33 am

DesignGuy wrote:
> I'm in the process of switching from a shared FreeBSD server to a dedicated
> RedHat server running Plesk v7.02 control panel. I have many php and perl
> scripts that use the server path to files and directories. Since the paths
> differ between servers I would like to set up aliases to prevent having to
> go in and change the scripts.
>
> For example I would need any reference to /usr/local/etc/httpd/cgi-bin/ in a
> php or PERL script to point to /home/httpd/vhosts/domain.com/cgi-bin/
>
> I believe this could have been done on the old server by putting either an
> Alias or ScriptAlias directive in the httpd.conf. But on the new server I
> have an /etc/httpd/conf/httpd.conf, plus an httpd.include and vhost.conf for
> each domain in the /home/httpd/vhosts/domain.com/conf/ directory.
>
> What code should go in which file? I've tried several combinations and can't
> get them to work....
>
>
>
>
>

you must put the alias directive in httpd.conf or you include in
httpd.conf yout own config file i think the secound way is more usefuel.
martin
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com