Salut.
In dorinta mea de a invata cit mai mult, m-am lovit de urmatoarea problema:
vreau sa fac pe sistemul meu (mandriva 2006) mai multe servere virtuale web.
Am reusit sa creez unul, insa, daca mai fac inca unul, adresare 192.168.0.18 va pointa tot spre primul. Unde am gresit?
Va multumesc.
In functie de ceea ce ai facut vezi aici:
http://httpd.apache.org/docs/1.3/vhosts/
Cristian
http://www.mandrivausers.ro
Am definit 2 servere virtuale, conform:
ServerAdmin "ssemp00@gmail.com"
DocumentRoot "/home/marius/work/php"
ServerName "it"
ErrorLog "/var/log/vs.log"
TransferLog "/var/log/vs1.log"
ServerAdmin "ssemp00@gmail.com"
DocumentRoot "/home/marius/work/php/caransebes"
ServerName "caransebes"
ErrorLog "/var/log/vs.log"
TransferLog "/var/log/vs1.log"
insa, dupa ce restartez httpd, primesc mesajul:
The connection was refused when attempting to connect 192.168.0.118:80
ce nu-i bine?
Marius
-----------------------------------------
Linux registered user # 419668
Mai intai trebuie sa definesti virtualhosturile, daca nu ai facut cumva asta.
e.g.
NameVirtualHost 192.168.0.18:80
NamevirtualHost 192.168.0.18:8080
iar in /etc/hosts evident sa ai trecut:
192.168.0.18 caransebes it
Salut,
am definit vhost, asa cum ati spus, am restartat httpd si la comanda httpd -S obtin urmatoarele:
httpd: Could not determine the server's fully qualified domain name, using 192.168.0.18 for ServerName
VirtualHost configuration:
192.168.0.18:80 is a NameVirtualHost
default server it (/etc/httpd/conf/httpd.conf:1064)
port 80 namevhost it (/etc/httpd/conf/httpd.conf:1064)
192.168.0.18:8080 is a NameVirtualHost
default server caransebes (/etc/httpd/conf/httpd.conf:1073)
port 8080 namevhost caransebes (/etc/httpd/conf/httpd.conf:1073)
Syntax OK
la comanda ping pe cele 2 servere, ele fiind inregistrate in /etc/hosts, primesc raspuns:
[root@it ~]# ping it
PING caransebes (192.168.0.18) 56(84) bytes of data.
64 bytes from caransebes (192.168.0.18): icmp_seq=1 ttl=64 time=0.060 ms
64 bytes from caransebes (192.168.0.18): icmp_seq=2 ttl=64 time=0.058 ms
64 bytes from caransebes (192.168.0.18): icmp_seq=3 ttl=64 time=0.058 ms
--- caransebes ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.058/0.058/0.060/0.008 ms
[root@it ~]# ping caransebes
PING caransebes (192.168.0.18) 56(84) bytes of data.
64 bytes from caransebes (192.168.0.18): icmp_seq=1 ttl=64 time=0.056 ms
64 bytes from caransebes (192.168.0.18): icmp_seq=2 ttl=64 time=0.059 ms
--- caransebes ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.056/0.057/0.059/0.007 ms
[root@it ~]#
Din pacate insa, tot nu face ceea ce trebuie....
:-(
Marius
-----------------------------------------
Linux registered user # 419668