localhost nicht erreichbar

Direkte Linux-Programmierung, POSIX
Antworten
Benutzeravatar
cloidnerux
Moderator
Beiträge: 3123
Registriert: Fr Sep 26, 2008 4:37 pm
Wohnort: Ram (Gibts wirklich)

localhost nicht erreichbar

Beitrag von cloidnerux » Mi Mär 25, 2009 6:20 pm

So, ahb unter meinem OpenSuse 11.1 folgendes Porblem:
Ich will auf localhost zugreifen und mir dort eine Website anzeigen lassen. gestern funktionierte dies auch ohne Probleme, heißt ich ahb sie angezeigt bekommen.
Heute bekomme ich nur ncoh: Firefox kann keine verbindung zu dem Server unter localhost aufbauen.
Wenn ich in Yast am HTTP server etwas änderen will und Yast dann den Appache2 server neustarten will kommt immer nur:

Code: Alles auswählen

Fehler
Der Deinst 'appache2' kann nicht angepasst werden.
Woran liegt das und wo ist die Lösung für das problem?
Redundanz macht wiederholen unnötig.
quod erat expectandum

Benutzeravatar
Jside
Beiträge: 377
Registriert: Di Nov 11, 2008 12:56 am

Re: localhost nicht erreichbar

Beitrag von Jside » Mi Mär 25, 2009 6:22 pm

probier mal:
sudo bash
/etc/init.d/apache2 restart
Ansonsten ewtl. mal neu starten...

Benutzeravatar
cloidnerux
Moderator
Beiträge: 3123
Registriert: Fr Sep 26, 2008 4:37 pm
Wohnort: Ram (Gibts wirklich)

Re: localhost nicht erreichbar

Beitrag von cloidnerux » Mi Mär 25, 2009 6:28 pm

Ansonsten ewtl. mal neu starten...
3x Unerfolgreich.
probier mal:
sudo bash
/etc/init.d/apache2 restart
Da kommt:

Code: Alles auswählen

Syntax error on line 29 of /etc/apache2/default-server.conf:
allow requieres at least two arguments, 'from' followed by hostnames or IP-address wildcards
Redundanz macht wiederholen unnötig.
quod erat expectandum

Benutzeravatar
Jside
Beiträge: 377
Registriert: Di Nov 11, 2008 12:56 am

Re: localhost nicht erreichbar

Beitrag von Jside » Mi Mär 25, 2009 6:34 pm

Da hätten wir doch den Übeltäter, YAST hat in einer Config mist gebaut...

Hier ist meine /etc/apache2/default-server.conf läuft ohne Probleme:

Code: Alles auswählen

#
# Global configuration that will be applicable for all virtual hosts, unless
# deleted here, or overriden elswhere.
# 

DocumentRoot "/srv/www/htdocs"

#
# Configure the DocumentRoot
#
<Directory "/srv/www/htdocs">
  	# Possible values for the Options directive are "None", "All",
	# or any combination of:
	#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
	#
	# Note that "MultiViews" must be named *explicitly* --- "Options All"
	# doesn't give it to you.
	#
	# The Options directive is both complicated and important.  Please see
	# http://httpd.apache.org/docs-2.2/mod/core.html#options
	# for more information.
Options None
  	# AllowOverride controls what directives may be placed in .htaccess files.
	# It can be "All", "None", or any combination of the keywords:
	#   Options FileInfo AuthConfig Limit
AllowOverride None
  	# Controls who can get stuff from this server.
Order allow,deny
 Allow from all
</Directory>

# Aliases: aliases can be added as needed (with no limit). The format is 
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL.  So "/icons" isn't aliased in this
# example, only "/icons/".  If the fakename is slash-terminated, then the 
# realname must also be slash terminated, and if the fakename omits the 
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings.  If you
# do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "/usr/share/apache2/icons/"

<Directory "/usr/share/apache2/icons">
 Options Indexes MultiViews
 AllowOverride None
 Order allow,deny
 Allow from all
</Directory>

# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"

# "/srv/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/srv/www/cgi-bin">
 AllowOverride None
 Options +ExecCGI -Includes
 Order allow,deny
 Allow from all
</Directory>

# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# To disable it, simply remove userdir from the list of modules in APACHE_MODULES 
# in /etc/sysconfig/apache2.
#
<IfModule mod_userdir.c>
  	# Note that the name of the user directory ("public_html") cannot simply be
	# changed here, since it is a compile time setting. The apache package
	# would have to be rebuilt. You could work around by deleting
	# /usr/sbin/suexec, but then all scripts from the directories would be
	# executed with the UID of the webserver.
UserDir public_html
  	# The actual configuration of the directory is in
	# /etc/apache2/mod_userdir.conf.
Include /etc/apache2/mod_userdir.conf
</IfModule>


# Include all *.conf files from /etc/apache2/conf.d/.
#
# This is mostly meant as a place for other RPM packages to drop in their
# configuration snippet.
#
# You can comment this out here if you want those bits include only in a
# certain virtual host, but not here.
#
Include /etc/apache2/conf.d/*.conf

# The manual... if it is installed ('?' means it won't complain)
Include /etc/apache2/conf.d/apache2-manual?conf
ServerName linux-yqa4.lan

ServerAdmin root@linux-yqa4.lan

Benutzeravatar
cloidnerux
Moderator
Beiträge: 3123
Registriert: Fr Sep 26, 2008 4:37 pm
Wohnort: Ram (Gibts wirklich)

Re: localhost nicht erreichbar

Beitrag von cloidnerux » Mi Mär 25, 2009 6:39 pm

Was ich mich frage ist: wie kann die Datei verändert werden, wenn sie gestern ncoh Funktionierte und ich den Computer nur neugestartet hatte?
Redundanz macht wiederholen unnötig.
quod erat expectandum

Benutzeravatar
Jside
Beiträge: 377
Registriert: Di Nov 11, 2008 12:56 am

Re: localhost nicht erreichbar

Beitrag von Jside » Mi Mär 25, 2009 7:10 pm

cloidnerux hat geschrieben:Was ich mich frage ist: wie kann die Datei verändert werden, wenn sie gestern ncoh Funktionierte und ich den Computer nur neugestartet hatte?
Wenn du über Yast den Apache gestartet hast, werden vorher alle Konfigurationen eingelesen...

Benutzeravatar
cloidnerux
Moderator
Beiträge: 3123
Registriert: Fr Sep 26, 2008 4:37 pm
Wohnort: Ram (Gibts wirklich)

Re: localhost nicht erreichbar

Beitrag von cloidnerux » Mi Mär 25, 2009 7:11 pm

naja, jezt Funktionierts, danke für die schnelle Hilfe.
Redundanz macht wiederholen unnötig.
quod erat expectandum

Antworten