ubuntuusers.de

Apache nur [ber Locahost erreichbar

Status: Gelöst | Ubuntu-Version: Ubuntu 12.04 (Precise Pangolin)
Antworten |

nieselfriem

Anmeldungsdatum:
1. November 2007

Beiträge: 72

Hallo!

ich habe apache installiert. Dieser ist auch nett ueber localhost erreichbar. Nun soll sie auch ueber die lokale IP/Adresse erreichbar sein. Leider funktioniet das nicht. Was mu- ich noch konfigurerien. in der apache2.conf ist Listen auf 80 gestellt und eine konkrete IP festgelegt

Gruesse niesel

Maysi2k

Anmeldungsdatum:
27. Dezember 2008

Beiträge: 362

Wohnort: Eppelheim

Normal sollte Apache von anfangan auf allen Interfaces und Adressen lauschen. Guck dir mal die Datei default in /etc/apache2/sites-available an.

Hier sollte am anfang <VirtualHost *:80> stehen.

Außerdem ob in der datei ports.conf in /etc/apache2/

1
2
NameVirtualHost *:80
Listen 80

steht.

coffeeholic Team-Icon

Avatar von coffeeholic

Anmeldungsdatum:
10. August 2012

Beiträge: 1938

Wohnort: ::1

Zeig mal bitte die apache.conf und die betreffenden Konfigurationsdateien in /etc/apache2/sites-enabled/

nieselfriem

(Themenstarter)

Anmeldungsdatum:
1. November 2007

Beiträge: 72

Hallo!

Hier meine Apache-Konfiguartionsdateien. Im Prinzip ist es die Standartkonfiguration nach der Installation. Wichtig ist evtl., dass die IP die ich ansprechen will vom WLAN ist und per DHCP vom Router konfiguriert wird

Apache.conf:

 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

LockFile ${APACHE_LOCK_DIR}/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5

<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

<IfModule mpm_worker_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75 
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>
<IfModule mpm_event_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75 
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all
</Files>

DefaultType None
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn

# Include module configuration:
Include mods-enabled/*.load
Include mods-enabled/*.conf

# Include all the user configurations:
Include httpd.conf

# Include ports listing
Include ports.conf

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include generic snippets of statements
Include conf.d/

# Include the virtual host configurations:
Include sites-enabled/

port.conf:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to <VirtualHost *:443>
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

/etc/apache2/sites-available/default:

 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
<VirtualHost *:80>
	ServerAdmin webmaster@localhost

	DocumentRoot /var/www
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

Grüße niesel

coffeeholic Team-Icon

Avatar von coffeeholic

Anmeldungsdatum:
10. August 2012

Beiträge: 1938

Wohnort: ::1

Du hast die httpd.conf vergessen. Dort könnte auch der Hund begraben liegen, und mir dämmert, dass er es auch ist. 😉
edit: Ich habe vergessen, nach der httpd.conf zu fragen.

Frank62

Avatar von Frank62

Anmeldungsdatum:
8. Dezember 2008

Beiträge: 2106

Wohnort: Borken

Und wo ist jetzt der Fehler gewesen?

Antworten |