You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Paul Stephenson <PS...@ficgroup.com> on 2002/02/12 17:46:03 UTC

VirtualHost question (working but need tweeking)

Hello,
 
I have a helpdesk website that was developed by someone else.  They want us to log onto the site using the following URL.
 
http://helpdesk.domainname.com/hd and I am trying to get it to where you can just type http://helpdesk.domainname.com <http://helpdesk.domainname.com/>  to help the users.  Because all intranet users will just be typing http://helpdesk <http://helpdesk/>  .  This all works as of now (kind of), but I have my document root set to the directory one level up from the /hd directory that is mentioned in the URL.  The problem is that all of the code references to all the files with the hd/filename.php.  This creates a problem because if I tell apache that the document root is set to /home/httpd/sites/helpdesk.domainname.com/hd I run into the old catch 22.  Apache will find the index.html file, but then the user gets redirected to another webpage, but that page has referenced to hd/filename.php, so it is always looking in the wrong directory.  The old way I fixed this was to remove all the instances of hd/ in all the html and php files.  This is slow and cumbersome even with a good text editor.  
 
Is there any other way to get this working?  As of now, I just moved the index.html file into the document root directory and redirected it properly to the hd/ folder, but unfortunately, I am still getting some errors.
 
Like I said any help is appreciated.
 
Paul

Re: VirtualHost question (working but need tweeking)

Posted by RuneImp <ru...@imptech.net>.
Why not use a search and replace utility to go through all
the files for you. Search for "hd/" and replace with "/".
"Search & Replace 98" is great (& free) if you can do this
on a Windows machine. If this is a UNIX machine I'm sure
there are similar tools to do this sort of thing. Text is
infinately mutable on UNIX systems if you know how to do
it.


-=- RuneImp
ImpTech - Web Design, Hosting & Computer Tech
http://imptech.net
rune@imptech.net


----- Original Message -----
From: Paul Stephenson
To: users@httpd.apache.org
Sent: Tuesday, February 12, 2002 8:46 AM
Subject: VirtualHost question (working but need tweeking)


Hello,

I have a helpdesk website that was developed by someone else.  They want us to
log onto the site using the following URL.

http://helpdesk.domainname.com/hd and I am trying to get it to where you can
just type http://helpdesk.domainname.com to help the users.  Because all
intranet users will just be typing http://helpdesk .  This all works as of now
(kind of), but I have my document root set to the directory one level up from
the /hd directory that is mentioned in the URL.  The problem is that all of the
code references to all the files with the hd/filename.php.  This creates a
problem because if I tell apache that the document root is set to
/home/httpd/sites/helpdesk.domainname.com/hd I run into the old catch 22.
Apache will find the index.html file, but then the user gets redirected to
another webpage, but that page has referenced to hd/filename.php, so it is
always looking in the wrong directory.  The old way I fixed this was to remove
all the instances of hd/ in all the html and php files.  This is slow and
cumbersome even with a good text editor.

Is there any other way to get this working?  As of now, I just moved the
index.html file into the document root directory and redirected it properly to
the hd/ folder, but unfortunately, I am still getting some errors.

Like I said any help is appreciated.

Paul


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: VirtualHost question (working but need tweeking)

Posted by Joshua Slive <jo...@slive.ca>.
> From: Paul Stephenson [mailto:PStephenson@ficgroup.com]

> http://helpdesk.domainname.com/hd and I am trying to get it to where
> you can just type http://helpdesk.domainname.com

[Please post in plain text.]

Just use something like

RedirectMatch ^/$ http://helpdesk.domainname.com/hd/

This will tell browsers who request the document root to make a new request
in with the /hd/ directory.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Does Listening on port 80 mess things up?

Posted by Owen Boyle <ob...@bourse.ch>.
Darrel Austin wrote:
> 
> Let me rephrase the question.
> 
> I originally had apache set to listen to port 8015 when I was using that
> port. It worked fine.
> 
> Recently, we gave that box its own IP address, so we routed traffic normally
> (on port 80).
> 
> I didn't delete the listen command...I simply changed it to 'Listen 80',
> thinking it would work.
> 
> However, leaving that line in the config file disabled the server. If I
> removed it completely, it worked fine.

On port 80?

> My question was, why is that?

I don't suppose you could've typed "Listen 8O" by any chance...

Rgds,
Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Does Listening on port 80 mess things up?

Posted by Joshua Slive <jo...@slive.ca>.
> From: Darrel Austin [mailto:daustin@visi.com]

> Let me rephrase the question.
>
> I originally had apache set to listen to port 8015 when I was using that
> port. It worked fine.
>
> Recently, we gave that box its own IP address, so we routed
> traffic normally
> (on port 80).
>
> I didn't delete the listen command...I simply changed it to 'Listen 80',
> thinking it would work.
>
> However, leaving that line in the config file disabled the server. If I
> removed it completely, it worked fine.
>
> My question was, why is that?

My best guess is that something else changed inbetween the non-working and
working server that you didn't realize.  I have never heard of any problems
with the "Listen 80" configuration.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Does Listening on port 80 mess things up?

Posted by Darrel Austin <da...@visi.com>.
Let me rephrase the question.

I originally had apache set to listen to port 8015 when I was using that
port. It worked fine.

Recently, we gave that box its own IP address, so we routed traffic normally
(on port 80).

I didn't delete the listen command...I simply changed it to 'Listen 80',
thinking it would work.

However, leaving that line in the config file disabled the server. If I
removed it completely, it worked fine.

My question was, why is that?

-Darrel




on 2/13/02 1:00 AM, Martin Haase-Thomas at mht@meome-ag.de wrote:

> Maybe you forgot the Port directive?
> Did you register the new IP?
> 
> 
> Darrel Austin wrote:
> 
>> I had my linux box set up to listen to a specific port for HTTP. We recently
>> changed things around and gave it it's own IP address. So, I left the listen
>> line in the config file as such: listen 80.
>> 
>> I then could not get the server to respond. I finally tried deleting the
>> listen line and then it worked why.
>> 
>> Can anyone explain why that is? I thought the server listens on port 80 by
>> default as-is.
>> 
>> Just curious...
>> 
>> -Darrel
>> 
>> 
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>> 
>> 
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Does Listening on port 80 mess things up?

Posted by Martin Haase-Thomas <mh...@meome-ag.de>.
Maybe you forgot the Port directive?
Did you register the new IP?


Darrel Austin wrote:

>I had my linux box set up to listen to a specific port for HTTP. We recently
>changed things around and gave it it's own IP address. So, I left the listen
>line in the config file as such: listen 80.
>
>I then could not get the server to respond. I finally tried deleting the
>listen line and then it worked why.
>
>Can anyone explain why that is? I thought the server listens on port 80 by
>default as-is.
>
>Just curious...
>
>-Darrel
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Does Listening on port 80 mess things up?

Posted by Darrel Austin <da...@visi.com>.
I had my linux box set up to listen to a specific port for HTTP. We recently
changed things around and gave it it's own IP address. So, I left the listen
line in the config file as such: listen 80.

I then could not get the server to respond. I finally tried deleting the
listen line and then it worked why.

Can anyone explain why that is? I thought the server listens on port 80 by
default as-is.

Just curious...

-Darrel


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org