Clan x86

Technical (Development, Security, etc.) => Unix / Linux Discussion => Topic started by: Sidoh on September 18, 2005, 07:37:02 pm

Title: Apache Help
Post by: Sidoh on September 18, 2005, 07:37:02 pm
I talked to iago about this issue, but he was watching TV.  :(

Here's my problem:

When I try to access: http://sidoh.no-ip.org/mc/ it works fine.  When I try without the backslash (http://sidoh.no-ip.org/mc), it doesn't work.

I understand that without the backslash, it's probably thinking I'm wanting the FILE "mc," which doesn't exist, but I've never really run into an Apache server that does this (example: http://www.dark-wire.net/sidoh http://www.dark-wire.net/sidoh/).

Does anyone know what the issue is, or how I might resolve it?
Title: Re: Apache Help
Post by: Krazed on September 18, 2005, 07:44:28 pm
AFAIK, I've had and fixed that problem before.  :P

I think it was something in the httpd.conf, not entirely sure. I'll setup an httpd now and see.
Title: Re: Apache Help
Post by: Sidoh on September 18, 2005, 07:47:14 pm
Great.  Thanks.

Here's my httpd.conf (http://sidoh.dark-wire.net/Files/httpd.conf) if it helps.
Title: Re: Apache Help
Post by: Newby on September 18, 2005, 08:18:47 pm
If there is no / at the end, it tries to go to whatever domain you are set up to be. If there is a / at the end, it doesn't try and resolve anything.

i.e. if your full host/domain name isn't 'sidoh.no-ip.org' (hostname: sidoh (meaning your bash prompt by default is username@sidoh:dir$); domain name: no-ip.org) it will try and resolve it to whatever you have your hostname.domainame set to (coolhostname.randomdomainnamehere)

When I had deathrider / impaler, I had to set my hostname in httpd.conf to "impaler.x86labs.org" because if people didn't throw a / at the end, it would try and go to 'deathrider.x86labs.org' which doesn't exist. (hostname: deathrider; domain name: x86labs.org were my box's specifications)

Hope this helps.
Title: Re: Apache Help
Post by: Sidoh on September 18, 2005, 08:25:42 pm
Thanks for the input, Newby.

This is my ServerName setting:

Code: [Select]
#     
# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e., use
# "www" instead of the host's real name).
#     
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address (e.g., http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
ServerName http://sidoh.no-ip.org/

I think I put my server under the domain "tehnetwork".
Title: Re: Apache Help
Post by: Newby on September 18, 2005, 08:42:02 pm
Lose the http:// part.

And the trailing slash at the end.
Title: Re: Apache Help
Post by: Sidoh on September 18, 2005, 08:47:19 pm
Giving it a try.

edit --

Code: [Select]
#     
# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e., use
# "www" instead of the host's real name).
#     
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address (e.g., http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
ServerName sidoh.no-ip.org       

It works.  Newby:  :-* <3<3

http://sidoh.no-ip.org/mc
Title: Re: Apache Help
Post by: Newby on September 18, 2005, 08:53:58 pm
I get redirected to microsoft.com (damn Firefox), but as long as it works for you, I'm happy. :P
Title: Re: Apache Help
Post by: Krazed on September 18, 2005, 09:00:20 pm
Works for me.
Title: Re: Apache Help
Post by: Sidoh on September 18, 2005, 09:00:53 pm
Works for me.

:-*