[apache] slash toevoegen of niet ?

Pagina: 1
Acties:

  • Skinny
  • Registratie: Januari 2000
  • Laatst online: 09-02 15:16
Goedemiddag allemaal,

M.i. paste dit topic het beste hier, zo niet.. move dan maar. :)

Na een verse installatie van Debian afgelopen week op mijn servertje thuis zit ik met het volgende probleem.

Ik IE ga ik naar http://192.168.1.1:4000 en dan kom ik netjes op de homepage. Ik heb wat subdirs daarop staan, dus als je http://192.168.1.1:4000/subdir typt zou je verwachten dat je daar uit komt, maar dan krijg ik een Page Not Found error. Met een / erachter doet ie het wel.

Ik heb de config files van apache doorgespit, maar ik kom er niet echt uit :

Hoe krijg ik apache zo geconfigureerd dat die die / automatisch erachter zet of dat ie daar ongevoelig voor is.

edit:

In de search heb ik dit gevonden
[topic=319097/1/25]
maar dat werkt dus niet

SIZE does matter.
"You're go at throttle up!"


Verwijderd

Wat heb je dan nu als ServerName?

  • Skinny
  • Registratie: Januari 2000
  • Laatst online: 09-02 15:16
code:
1
ServerName trinity.breakie.com

Bij mijn webhost verwijst trinity.breakie.com naar mijn thuis-ip adres.

SIZE does matter.
"You're go at throttle up!"


  • elnino
  • Registratie: Augustus 2001
  • Laatst online: 03-02 04:42
Op maandag 31 december 2001 12:11 schreef Skinny het volgende:
edit:

In de search heb ik dit gevonden
[topic=319097/1/25]
maar dat werkt dus niet
In dit topic staat een link naar de Apache-FAQ
Why does accessing directories only work when I include the trailing "/" (e.g., http://foo.domain.com/~user/) but not when I omit it (e.g., http://foo.domain.com/~user)?
When you access a directory without a trailing "/", Apache needs to send what is called a redirect to the client to tell it to add the trailing slash. If it did not do so, relative URLs would not work properly. When it sends the redirect, it needs to know the name of the server so that it can include it in the redirect. There are two ways for Apache to find this out; either it can guess, or you can tell it. If your DNS is configured correctly, it can normally guess without any problems. If it is not, however, then you need to tell it.

Add a ServerName directive to the config file to tell it what the domain name of the server is.

  • jurri@n
  • Registratie: Maart 2000
  • Laatst online: 21-02 08:43
Heb ook eens zoiets gehad.. Ik draaite apache vanaf m'n bracket op school, maar daarin stond dezelfde servernaam als m'n bak thuis... server op school-pc was alleen te bereiken als je er een / achter zette...

Heeft iets met servernaam te maken... misschien verwijst de DNS naar je EXTERNE ip en wil jij het INTERNE (192.168.1.1) ip hebben? :?

  • Skinny
  • Registratie: Januari 2000
  • Laatst online: 09-02 15:16
Op maandag 31 december 2001 12:21 schreef elnino het volgende:

[..]

In dit topic staat een link naar de Apache-FAQ
[..]
Dit is echt vaag, of eigenlijk ook weer niet, maar het volgende werkt dus wel.

Als ServerName heb ik nu mijn externe IP (213.73.177.152) en dan werkt het gewoon goed, maar waarom kan ik daar niet gewoon trinity.breakie.com neerzetten als mijn webhost trinity.breakie.com resolved naar 213.73.177.152 ?

SIZE does matter.
"You're go at throttle up!"

Pagina: 1