konstigheter med url:er i apache
konstigheter med url:er i apache
Jag kör en apache-server på senaste debian och har ett mystiskt problem med url:er. Om jag skriver 192.168.1.1 eller 192.168.1.1/ (med eller utan ett avslutande slash) så får jag upp standardsidan, index.html, precis som man ska. Men om jag skriver 192.168.1.1/~andreas (alltså utan ett avslutande slash) så får jag ett felmeddelande som säger "the connection was refused when attempting to contact 127.0.0.1". Om jag däremot tar med det avslutande slashet så fungerar det som det ska.
Jag hörde mig för på irc igår och då var det någon som sa att jag skulle testa att uppgradera apache 1.3.26 till 1.3.29, jag gjorde så men det hjälpte inte.
Jag hörde mig för på irc igår och då var det någon som sa att jag skulle testa att uppgradera apache 1.3.26 till 1.3.29, jag gjorde så men det hjälpte inte.
The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch and a user with an idea.
In theory, there is no difference between theory and practice. But, in practice, there is.
In theory, there is no difference between theory and practice. But, in practice, there is.
Det är nog ett dnsfel. Har varit med om samma sak jag med, apache vill resolva upp ett hostname när du går ner i katalogstrukturen, antar att det lika om du skapar en mapp i www-rooten och webbar in på den utan /. Går nog inte att lösa (rätta mig om jag har fel IcePic ) utan en egan lokaldnsserver som sköter resolvningen åt ditt lokala nät.
Fråga smart "Den som spar han har, men inte roligt"
Praxidike: Q9550/8GB/5180GB/DVD±RW/GTX760/24"TFT
Io: P-M 1,73/2GB/1000GB/DVD±RW/15"TFT
U32U: E-450 1,65/8GB/64GB SSD/HD6320/13,3"TFT
Kale: E6550/4GB/640GB/46"LED
Praxidike: Q9550/8GB/5180GB/DVD±RW/GTX760/24"TFT
Io: P-M 1,73/2GB/1000GB/DVD±RW/15"TFT
U32U: E-450 1,65/8GB/64GB SSD/HD6320/13,3"TFT
Kale: E6550/4GB/640GB/46"LED
Tror att man ska leka med "Servername" i sin apache-conf och/eller pilla i /etc/hosts. dns är bara
en distribuerad ersättning för hosts-filen.
=)
en distribuerad ersättning för hosts-filen.
=)
Oh give me a clone, my very own clone,
with the Y chromosome changed to X!
And since she's my own, of my own flesh and bone,
she'll be thinking of nothing but sex!
with the Y chromosome changed to X!
And since she's my own, of my own flesh and bone,
she'll be thinking of nothing but sex!
Jupps, precis samma sak om jag går in i en underkatalog till www-root.elvenman wrote:Det är nog ett dnsfel. Har varit med om samma sak jag med, apache vill resolva upp ett hostname när du går ner i katalogstrukturen, antar att det lika om du skapar en mapp i www-rooten och webbar in på den utan /. Går nog inte att lösa (rätta mig om jag har fel IcePic ) utan en egan lokaldnsserver som sköter resolvningen åt ditt lokala nät.
I min httpd.conf står det "Servername localhost" och i /etc/hosts står det "127.0.0.1 grim localhost". Kan du se något direkt fel i det? (Jag kan inte. )IcePic wrote:Tror att man ska leka med "Servername" i sin apache-conf och/eller pilla i /etc/hosts. dns är bara
en distribuerad ersättning för hosts-filen.
=)
The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch and a user with an idea.
In theory, there is no difference between theory and practice. But, in practice, there is.
In theory, there is no difference between theory and practice. But, in practice, there is.
- Peter Wall
- Hedersbit
- Posts: 7026
- Joined: 2002-03-08 0:52:56
- Location: Stockholm
- Contact:
Jag hade samma probs när datorn stod hos pappa, när jag flyttade hem servern och körde igång den ville den inte vara med var tvingad att köra nått enkelt add host "nånting" för att få igång nätet igen, sen fungerade det där också ..
Diplomerad webbutvecklare
Microsoft Certified Professional Windows 2003
Microsoft Certified Technology Specialist Windows Vista
"Did you know kidneys and applesauce are a delicacy in Sweden? I'm gonna get my applesauce back!"
Microsoft Certified Professional Windows 2003
Microsoft Certified Technology Specialist Windows Vista
"Did you know kidneys and applesauce are a delicacy in Sweden? I'm gonna get my applesauce back!"
när du har localhost som namn så tror ju servern att den endast lyssnar på locahost och 192.168.0.1/~username är i själva verket ett alias till (sätt in Servername från din httpd.conf)/~username/nva wrote:Jupps, precis samma sak om jag går in i en underkatalog till www-root.elvenman wrote:Det är nog ett dnsfel. Har varit med om samma sak jag med, apache vill resolva upp ett hostname när du går ner i katalogstrukturen, antar att det lika om du skapar en mapp i www-rooten och webbar in på den utan /. Går nog inte att lösa (rätta mig om jag har fel IcePic ) utan en egan lokaldnsserver som sköter resolvningen åt ditt lokala nät.
I min httpd.conf står det "Servername localhost" och i /etc/hosts står det "127.0.0.1 grim localhost". Kan du se något direkt fel i det? (Jag kan inte. )IcePic wrote:Tror att man ska leka med "Servername" i sin apache-conf och/eller pilla i /etc/hosts. dns är bara
en distribuerad ersättning för hosts-filen.
=)
som i ditt fall blir localhost/~username/
//Jag reserverar mig för ev. stavfel
Abit NF7-S V2.0 AthlonXP2500+@3200+ zalman 7000alcu | 2xTwinmos 512mb 400mhz | NVIDIA 6600GT 128GDDR3 | NEC 3500A | 200gb sata
|Alla går att köpa|Alla har ett pris|
hispan.se
Abit NF7-S V2.0 AthlonXP2500+@3200+ zalman 7000alcu | 2xTwinmos 512mb 400mhz | NVIDIA 6600GT 128GDDR3 | NEC 3500A | 200gb sata
|Alla går att köpa|Alla har ett pris|
hispan.se
I och med att jag har dynamiskt ip så får det vara som det är.
The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch and a user with an idea.
In theory, there is no difference between theory and practice. But, in practice, there is.
In theory, there is no difference between theory and practice. But, in practice, there is.
Nej, jag vet, men det är ip:t jag har mot det lokala nätverket, utåt har jag ett dynamiskt ip.IcePic wrote:192.168.1.1/ är inte ett dyn ip.nva wrote:I och med att jag har dynamiskt ip så får det vara som det är.
The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch and a user with an idea.
In theory, there is no difference between theory and practice. But, in practice, there is.
In theory, there is no difference between theory and practice. But, in practice, there is.
Men om du webbar in via den hostname du troligtvis har knutit till ditt ip. Måste du ha / på slutet då med?nva wrote:Nej, jag vet, men det är ip:t jag har mot det lokala nätverket, utåt har jag ett dynamiskt ip.
Fråga smart "Den som spar han har, men inte roligt"
Praxidike: Q9550/8GB/5180GB/DVD±RW/GTX760/24"TFT
Io: P-M 1,73/2GB/1000GB/DVD±RW/15"TFT
U32U: E-450 1,65/8GB/64GB SSD/HD6320/13,3"TFT
Kale: E6550/4GB/640GB/46"LED
Praxidike: Q9550/8GB/5180GB/DVD±RW/GTX760/24"TFT
Io: P-M 1,73/2GB/1000GB/DVD±RW/15"TFT
U32U: E-450 1,65/8GB/64GB SSD/HD6320/13,3"TFT
Kale: E6550/4GB/640GB/46"LED
Om man går till http://agren.no-ip.org så fungerar det fint, men inte om man går till någon användares konto utan slash på slutet, alltså t.ex. http://agren.no-ip.org/~user
Samma som med ip-adressen alltså.
Samma som med ip-adressen alltså.
The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch and a user with an idea.
In theory, there is no difference between theory and practice. But, in practice, there is.
In theory, there is no difference between theory and practice. But, in practice, there is.
saxat ur httpd.conf (för apache) ..
RTFM + FAQs + GOOGLE.com !!#
# UseCanonicalName: (new for 1.3) With this setting turned on, whenever
# Apache needs to construct a self-referencing URL (a URL that refers back
# to the server the response is coming from) it will use ServerName and
# Port to form a "canonical" name. With this setting off, Apache will
# use the hostname:port that the client supplied, when possible. This
# also affects SERVER_NAME and SERVER_PORT in CGI scripts.
#
UseCanonicalName On
Ah, jag insåg inte att den gjorde på det viset, så nu satte jag Servername till agren.no-ip.org (UseCanonicalName var redan på) och då fungerade det helt perfekt. Tack för hjälpen.
The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch and a user with an idea.
In theory, there is no difference between theory and practice. But, in practice, there is.
In theory, there is no difference between theory and practice. But, in practice, there is.