» »

Apache virtualhost

Apache virtualhost

Dado-prlek ::

Pozdravljeni

Že v naprej se opravičujem za odprtje nove teme z to tematiko,
ker sem prebral vse teme in forume v zvezi z mojo težavo in ni pomagalo nič se obračam na vas in upam da mi boste znali pomagati.

Imam win xp, apache 2.2.22, en ip naslov, in več domen

1. v datoteki httpd.conf imam vključeno
Include conf/extra/httpd-vhosts.conf


2. v datoteki httpd-vhosts.conf je sledeče

(Naslov domen je izmišljen, jaz imam napisane prave)

NameVirtualHost *:80

[VirtualHost *:80>
ServerName www.domena.com
DocumentRoot "D:/Server/"
ServerAdmin domena@siol.net
ErrorLog "logs/domena-error_log"
CustomLog "logs/domena-access_log" common
[/VirtualHost>

[VirtualHost *:80>
ServerName www.drugadomena.si
DocumentRoot "D:/Server/web_www/drugadomena.si"
ServerAdmin info@drugadomena.si
ErrorLog "logs/drugadomena-error_log"
CustomLog "logs/drugadomena-access_log" common
[/VirtualHost>

[VirtualHost *:80>
ServerName www.tretjadomena.si
DocumentRoot "D:/Server/web_www/tretjadomena.si"
ServerAdmin info@tretjadomena.si
ErrorLog "logs/tretjadomena-error_log"
CustomLog "logs/tretjadomena-access_log" common
[/VirtualHost>

ITD ITD

predznak < sem moral zamenjati z [ ker javi napako pri oddaji teme

3. probal sem že vse, tudi * sem zamenjal za ip naslov pa ne dela. vse kaj sem zasledil na forumih sem probal pa nič

ko vpišem www.domena.com ali www.drugadomena.si ali www.tretjadomena.si ITD
vedno mi pokaže prvo stran www.domena.com
Aja pa še to vse domene kažejo na moj IP naslov od strežnika

Prosim za pomoč
Hvala

NoName ::

kaj pravi httpd -S

aja... pa od spremembe configa si restartal apache?
I can see dumb people...They're all around us... Look, they're even on this forum!

Zgodovina sprememb…

  • spremenil: NoName ()

Dado-prlek ::

vedno resetiral, -s ne pravi nič narobe

trnvpeti ::

kaj pravi dns?
imas notranji dns?
imas lookup domen preko routerja?
kaj pravijo apache logi?

prvo naredi samo domena1
poglej ce deluje

potem zbrisi, naredi samo domena2

potem zapisi domena1 in domena2 v hosts file(guglaj kako)

pol bos videl, kako se ti obnasa dns

ko bos videl, da ti dela dns prav
pol bos zacel gledat apache loge

po mojem sploh nisi nic sprobal, ampak si zelel da ti iz prve dela

pegasus ::

Poženi httpd -D DUMP_VHOSTS, da dobiš idejo, kaj si apache predstavlja, da si mu povedal v conf fajilh. Če si predstavlja isto, kar si mu hotel dopovedat, potem veselo s telnetom napadi port 80 in preveri, če stvar res deluje. Če deluje, vprašaj tvoj DNS, kam te pošlje, ko greš na neko od teh domen.

Dado-prlek ::

trnvpeti,
izbrisal vse domene in sprobal vsako domeno posebaj, zadeva dela,
ko pa vstavim ostale domene pa mi zmeraj in vedno pokaže samo tisto kar je navedeno pod prvo domeno.

dns strežnika nimam

Dado-prlek ::

pegasus

evo prilagam sliko

 slika

slika

Dado-prlek ::

pegasus

-D DUMP_VHOSTS, dela to kot mora,

a mi lahko opišeš kaj narediti naslednjo stvar.
Ta stvar mi že najeda živce.
vsi pišejo da jim stvar deluje, jaz sem probal zadevo na novo od začetka enih 500x in vedno brez uspeha.
lokalno dela kot singerica, preko neta pa ne :(

in res mi ni jasno kaj je narobe.

trnvpeti ::

NAT loopback

Dado-prlek ::

? si lahko bolj natančen prosim

trnvpeti ::

NAT loopback[edit]

NAT loopback, also known as NAT hairpinning or NAT reflection,[5] is a feature in many consumer routers[6] which allows a user to connect to his/her own public IP address from inside the LAN network. This is especially useful when a website (with domain) is hosted at that IP address. Consider the following network:
Public address: 203.0.113.1 (this is the address of the WAN interface on the router)
Internal address of router: 192.168.1.1
Address of the server: 192.168.1.2
Address of a computer: 192.168.100.1
When a packet is sent to 203.0.113.1 (public address) by 192.168.100.1 (a computer), the packet would normally be sent to the default gateway (the router). An exception could be made in the computer's routing tables, but by default the default gateway will be used. A router with the NAT-loopback feature will detect that 203.0.113.1 is the address of its WAN interface, and treat the packet as if coming from that interface. It decides based on DNAT (port forwarding) rules where the packet should go. For example, if the data were sent to port 80 and there is a DNAT rule for port 80 to go to 192.168.1.2, then it will send the packet there.
If no applicable DNAT rules are available, the router's firewall will drop the packet. An ICMP Destination Unreachable reply may or may not be sent. Note that if any DNAT rules were found, address translation is still in effect; the router still rewrites the source IP address in the packet. The computer (192.168.100.1) will send the packet as coming from 192.168.100.1, but just like when a packet was sent to any global IP address, the server (192.168.1.2) will receive it as coming from 203.0.113.1. When a reply is made by the server, the same thing happens again. The packet goes to the server's default gateway (the router), which will find the source and destination port in its NAT tables, and know that it originated from 192.168.100.1. This way, two-way communication is possible between hosts inside the LAN network via their public IP address.
NAT loopback is especially useful when a domain is hosted on the server. The domain name will resolve, unless the user is running a custom DNS server and has made an exception, to the public address. When the router does not have NAT loopback, any connection attempts to that IP address are discarded and time out. A workaround is to include the domain name in the hosts file,[7] but all subdomains would have to be included as well, and all devices in the LAN network would need to have the same modifications. Example entries for the hosts file, following the above network setup:
192.168.1.2 example.com
192.168.1.2 subdomain.example.com

google ti ne gre a ne?

Dado-prlek ::

to vem kaj je ta NAT, ampak kaj moram natančno narediti,
- na ruterju?
- na strežniku?

to pa mi ni jasno

trnvpeti ::

ce ves kaj je nat, potem ves, kje moras to narediti?

Dado-prlek ::

to vem kje, ampak neven kaj :(

ne sanja se mi kaj moram narediti
recimo za domeno www.xxx.com, in kaj za domeno www.yyy.si, in kaj za domeno www.žžž.at itd

trnvpeti ::

to ni za tebe!
poleg tega, da si len(miljon linkov na to temo), in da pricakujes, da bodo drugi naredili namesto tebe

prvo pricakujem od tebe, da se ne javis tukaj kaksen teden
v tem casu pa beri, pa googlaj

Dado-prlek ::

Trnvpeti, najprej hvala za tvojo neprijaznost,
pač nisem tako pameten ko ti, če bi prebral mojo prvo objavo potem bi s tvojo pametjo lahko videl oziroma razumel da enostavno ne grata.

Se opravičujem vsem, da sem sploh kaj objavil (sem upal da mi boste pomagali), še posebno pa tebi trnvpeti.

trnvpeti ::

pac samo videti je, da cakas, nic ne preberes
ko bos, ce bos, prebral navedel kaksen link, kjer si prebral, in povedal kaj te muci, bos vedno dobil pomoc

se pa postavi na drugo stran, da ti pomagas nekomu, in da ti taksen post napise, da se osnove ne pogleda, kako mu bos pomagal?

bos priznal, da je najboljsa pomoc, da ga skurcas, ker je len, in da naj prvo pogleda, in se pol vrne

posteno?

pegasus ::

Dado-prlek je izjavil:

-D DUMP_VHOSTS, dela to kot mora,
To lahko preveriš tako, da se s telnetom povežeš na port 80 tvojega apacha in ga poprosiš, če ti postreže en page:
GET / HTTP/1.1
Host: www.domena1.com
   

Pričakuješ, da se ti izpiše index strani domena1. Ponoviš še za vse ostale in pričakuješ, da se ti izpišejo njihovi indexi.

Do sedaj si verjetno v browserju kucal www.domena1.com? Preveri, kam te usmeri DNS, ko to nakucaš. Ping www.domena1.com, kater ip ti pinga?


Lekcija vsega tega naj ti bo, da je fino in koristno razumeti stvari, ki jih delaš, še preden se jih lotiš.


Vredno ogleda ...

TemaSporočilaOglediZadnje sporočilo
TemaSporočilaOglediZadnje sporočilo
»

Fedora Core 2 in Apache problem

Oddelek: Izdelava spletišč
91068 (955) atlet
»

dve spletni strani??

Oddelek: Izdelava spletišč
312103 (1652) MRB0rYS
»

VirtualHost oz. navidezne domene v apache

Oddelek: Izdelava spletišč
252255 (1953) Jackass
»

Apache

Oddelek: Izdelava spletišč
111256 (1140) Skrat
»

FOX server in virtualna domena?

Oddelek: Izdelava spletišč
61224 (1126) Ziga Dolhar

Več podobnih tem