Quellcode |
|
1 2 3 |
# IPv4 and IPv6 localhost aliases 127.0.0.1 localhost ::1 localhost |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# Virtual Hosts # # If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # <URL:http://httpd.apache.org/docs/2.2/vhosts/> # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. <IfDefine DEFAULT_VHOST> # see bug #178966 why this is in here # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 80 # Use name-based virtual hosting. NameVirtualHost *:80 # When virtual hosts are enabled, the main host defined in the default # httpd.conf configuration will go away. We redefine it here so that it is # still available. # # If you disable this vhost by removing -D DEFAULT_VHOST from # /etc/conf.d/apache2, the first defined virtual host elsewhere will be # the default. <VirtualHost *:80> ServerName mustername.dyndns.org Include /etc/apache2/vhosts.d/default_vhost.include <IfModule mpm_peruser_module> ServerEnvironment apache apache </IfModule> </VirtualHost> </IfDefine> # vim: ts=4 filetype=apache |
Quellcode |
|
1 2 3 4 |
* Starting apache2 ... apache2: apr_sockaddr_info_get() failed for workstation apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [ ok ] workstation home # |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »nutshell4« (28.03.2011, 20:41)
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
workstation home # ifconfig eth0 Link encap:Ethernet HWaddr 70:f3:95:00:44:3e inet addr:192.168.2.101 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::72f3:95ff:fe00:443e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:11716 errors:0 dropped:0 overruns:0 frame:0 TX packets:8975 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:12246080 (11.6 MiB) TX bytes:1167971 (1.1 MiB) Interrupt:16 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:70 errors:0 dropped:0 overruns:0 frame:0 TX packets:70 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5248 (5.1 KiB) TX bytes:5248 (5.1 KiB) workstation home # Auf dieser Maschine läuft ja auch mein Webserver |
Zitat
Leider kann ich von aussen nicht auf den Webserver zugreifen. Wenn ich in einem Webbrowser mustername.dyndns.org eingebe, kann er die Seite nicht öffnen.
Quellcode |
|
1 |
$ telnet mustername.dyndns.org 80 |
Der Browser sagt einfach, dass er die Seite nicht öffnen kann.Zitat
Welche Meldung kommt da konkret?
Hier die Ausgabe:Zitat
Wenn du eine telnet Sitzung startest, was passiert?
Quellcode |
|
1 2 3 |
workstation home # telnet mustername.dyndns.org 80 telnet: could not resolve mustername.dyndns.org/80: Name or service not known workstation home # |
Quellcode |
|
1 2 |
workstation home # ping -c3 mustername.dyndns.org ping: unknown host mustername.dyndns.org |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
workstation home # cat /etc/hosts # /etc/hosts: Local Host Database # # This file describes a number of aliases-to-address mappings for the for # local hosts that share this file. # # In the presence of the domain name service or NIS, this file may not be # consulted at all; see /etc/host.conf for the resolution order. # # IPv4 and IPv6 localhost aliases 127.0.0.1 localhost ::1 localhost 192.168.2.101 workstations.hades workstatio |
geben, ist das der Fall?Zitat
[Internet] DDNS wurde erfolgreich aktualisiert für mustername.dyndns.org (DEINE IP)
Das bedeutet doch, dass es an meiner Konfiguration von Apache liegen muss. In einer .conf muss es einen Fehler haben. Mit dem Router scheint alles ok zu sein. Deshalb hier nochmals die /etc/conf.d/apache2. Wichtig ist hier, dass ich ja bei APACHE2_OPTS die entsprechenden vhosts lade. Das tut es:Zitat
mustername.dyndns.org:80 is open and accepting connections. This indicates the port is not being blocked by either a firewall or your ISP and is currently operational.
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
workstation home # cat /etc/conf.d/apache2 # /etc/conf.d/apache2: config file for /etc/init.d/apache2 # When you install a module it is easy to activate or deactivate the modules # and other features of apache using the APACHE2_OPTS line. Every module should # install a configuration in /etc/apache2/modules.d. In that file will have an # <IfDefine NNN> directive where NNN is the option to enable that module. # # Here are the options available in the default configuration: # # AUTH_DIGEST Enables mod_auth_digest # AUTHNZ_LDAP Enables authentication through mod_ldap (available if USE=ldap) # CACHE Enables mod_cache # DAV Enables mod_dav # ERRORDOCS Enables default error documents for many languages. # INFO Enables mod_info, a useful module for debugging # LANGUAGE Enables content-negotiation based on language and charset. # LDAP Enables mod_ldap (available if USE=ldap) # MANUAL Enables /manual/ to be the apache manual (available if USE=docs) # MEM_CACHE Enables default configuration mod_mem_cache # PROXY Enables mod_proxy # SSL Enables SSL (available if USE=ssl) # SUEXEC Enables running CGI scripts (in USERDIR) through suexec. # USERDIR Enables /~username mapping to /home/username/public_html # # # The following two options provide the default virtual host for the HTTP and # HTTPS protocol. YOU NEED TO ENABLE AT LEAST ONE OF THEM, otherwise apache # will not listen for incomming connections on the approriate port. # # DEFAULT_VHOST Enables name-based virtual hosts, with the default # virtual host being in /var/www/localhost/htdocs # SSL_DEFAULT_VHOST Enables default vhost for SSL (you should enable this # when you enable SSL) # APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5" # Extended options for advanced uses of Apache ONLY # You don't need to edit these unless you are doing crazy Apache stuff # As not having them set correctly, or feeding in an incorrect configuration # via them will result in Apache failing to start # YOU HAVE BEEN WARNED. # PID file #PIDFILE=/var/run/apache2.pid # timeout for startup/shutdown checks #TIMEOUT=10 # ServerRoot setting #SERVERROOT=/usr/lib64/apache2 # Configuration file location # - If this does NOT start with a '/', then it is treated relative to # $SERVERROOT by Apache #CONFIGFILE=/etc/apache2/httpd.conf # Location to log startup errors to # They are normally dumped to your terminal. #STARTUPERRORLOG="/var/log/apache2/startuperror.log" # A command that outputs a formatted text version of the HTML at the URL # of the command line. Designed for lynx, however other programs may work. #LYNX="lynx -dump" # The URL to your server's mod_status status page. # Required for status and fullstatus #STATUSURL="http://localhost/server-status" # Method to use when reloading the server # Valid options are 'restart' and 'graceful' # See http://httpd.apache.org/docs/2.2/stopping.html for information on # what they do and how they differ. #RELOAD_TYPE="graceful" |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
workstation nicolas # cat /etc/apache2/vhosts.d/00_default_vhost.conf # Virtual Hosts # # If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # <URL:http://httpd.apache.org/docs/2.2/vhosts/> # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration. <IfDefine DEFAULT_VHOST> # see bug #178966 why this is in here # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 80 # Use name-based virtual hosting. NameVirtualHost *:80 # When virtual hosts are enabled, the main host defined in the default # httpd.conf configuration will go away. We redefine it here so that it is # still available. # # If you disable this vhost by removing -D DEFAULT_VHOST from # /etc/conf.d/apache2, the first defined virtual host elsewhere will be # the default. <VirtualHost *:80> ServerName mustername.dyndns.org Include /etc/apache2/vhosts.d/default_vhost.include <IfModule mpm_peruser_module> ServerEnvironment apache apache </IfModule> </VirtualHost> </IfDefine> # vim: ts=4 filetype=apache |
Quellcode |
|
1 2 3 4 5 6 7 8 9 |
$ ping -c3 mustername.dyndns.org PING mustername.dyndns.org (80.128.60.162) 56(84) bytes of data. 64 bytes from p50803CA2.dip.t-dialin.net (80.128.60.162): icmp_req=1 ttl=59 time=99.3 ms 64 bytes from p50803CA2.dip.t-dialin.net (80.128.60.162): icmp_req=2 ttl=59 time=98.4 ms 64 bytes from p50803CA2.dip.t-dialin.net (80.128.60.162): icmp_req=3 ttl=59 time=98.1 ms --- mustername.dyndns.org ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 98.180/98.678/99.366/0.502 ms |
Quellcode |
|
1 |
$ dig mustername.dyndns.org |
Ich beschäftige mich neu mit dieser ganzen Thematik, daher kann es durchaus sein, dass ich einen Denkfehler mache. Grundsätzlich brauche ich DynDns.org ja nur um von ausserhalb meines Netzwerkes auf meinen Server zuzugreifen. Innerhalb funktioniert das bereits tadellos. Ich habe auf meinem Webserver eine Groupware installiert und kann von jedem beliebigen Rechner in meinem Netzwerk auf den Webserver zugreifen und mich einloggen. Sobald ich ausserhalb meines Netzwerkes bin, funktioniert dies nicht mehr. Dazu brauche ich ja den mustername.dyndns.org. Wenn ich von ausserhalb diese in meinen Webbrowser eingebe, geschieht doch folgendes:Zitat
Die Auflösung via "ping" bzw. besser "dig" muss zuerst funktionieren bevor du überhaupt an apache denken kannst.
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
workstation home # dig mustername.dyndns.org ; <<>> DiG 9.7.1 <<>> mustername.dyndns.org ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 46694 ;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;mustername.dyndns.org. IN A ;; Query time: 41 msec ;; SERVER: 192.168.1.1#53(192.168.1.1) ;; WHEN: Sat Dec 11 10:02:05 2010 ;; MSG SIZE rcvd: 37 workstation home # |
Zitat
Ich werde an DynDns.com weitergeleitet
DynDns schaut in meinem Konto was für eine, nach aussen sichtbare, IP mein Router hat (musste ich ja bei der Konfiguration des Kontos angeben).
DynDns leitet mich an meinen Router weiter.
Der Router sollte mich mittels Port Forwarding an meinen Rechner resp. Webserver weiterleiten.
Zitat
Quellcode
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 workstation home # dig mustername.dyndns.org ; <<>> DiG 9.7.1 <<>> mustername.dyndns.org ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 46694 ;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;mustername.dyndns.org. IN A ;; Query time: 41 msec ;; SERVER: 192.168.1.1#53(192.168.1.1) ;; WHEN: Sat Dec 11 10:02:05 2010 ;; MSG SIZE rcvd: 37
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
$ dig dyle.home.dyndns.org ; <<>> DiG 9.7.2-P2 <<>> dyle.home.dyndns.org ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25184 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;dyle.home.dyndns.org. IN A ;; ANSWER SECTION: dyle.home.dyndns.org. 60 IN A 80.121.122.39 ;; Query time: 34 msec ;; SERVER: 195.3.96.67#53(195.3.96.67) ;; WHEN: Sat Dec 11 10:18:29 2010 ;; MSG SIZE rcvd: 54 |