ubuntuusers.de

apache a2ensite

Status: Gelöst | Ubuntu-Version: Ubuntu 13.10 (Saucy Salamander)
Antworten |

xabbuh Team-Icon

Anmeldungsdatum:
25. Mai 2006

Beiträge: 6411

agschaal schrieb:

das habe ich schon manuell gemacht, aber ohne echte wirkung.

Was für eine Ausgabe gibt Dir ls -l /etc/apache2/sites-enabled?

agschaal

(Themenstarter)

Anmeldungsdatum:
13. August 2009

Beiträge: 680

Wohnort: Berlin

ls -l

root@buddha-mobil:/etc/apache2/sites-enabled# ls -l
insgesamt 0
lrwxrwxrwx 1 root root 35 Sep 29 19:10 000-default.conf -> ../sites-available/000-default.conf
lrwxrwxrwx 1 root root 27 Okt  2 17:51 testsite -> ../sites-available/testsite

as

also, bei manuellem eintrag in /etc/apache2/sites-enabled lößt er die ip des vhost auf. das kann aber auch am eintrag in /etc/hosts liegen.

das dokumentenverzeichnis /var/www/testsite benutzt er nicht, im browser bekomme ich aber unter testsite/testsite die richtige index.html angezeigt.

as

xabbuh Team-Icon

Anmeldungsdatum:
25. Mai 2006

Beiträge: 6411

agschaal schrieb:

testsite enthält:

	ServerName testsite

	ServerAdmin info@platon-gruppe.de
	DocumentRoot /var/www/testsite

Was mir gerade erst auffällt: Enthält Dein VHost Datei für testsite wirklich nur diese drei Zeilen?

agschaal

(Themenstarter)

Anmeldungsdatum:
13. August 2009

Beiträge: 680

Wohnort: Berlin

zur zeit ja, als angaben

komplett sieht sie so aus:

VirtualHost *:80>
	ServerName www.testsite.localhost
	ServerAlias testsite
	ServerAdmin info@platon-gruppe.de
	DirectoryIndex index.html
	DocumentRoot /var/www/testsite/

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

as

xabbuh Team-Icon

Anmeldungsdatum:
25. Mai 2006

Beiträge: 6411

Verstehe ich jetzt nicht. Hast Du die Datei jetzt gerade in einen vollständigen VHost geändert oder war sie vorher auch schon komplett?

agschaal

(Themenstarter)

Anmeldungsdatum:
13. August 2009

Beiträge: 680

Wohnort: Berlin

eine Frage, bei mir gibt es ein /etc/apache2 kein conf.d mehr. (Saucy-neuinstall)

Könnte dies mein eigentlicher Fehler sein oder verstehe ich die Neustruktur bloß nicht?

as

Moderiert von xabbuh:

Beitrag an Deine Fragestellung angehängt

agschaal

(Themenstarter)

Anmeldungsdatum:
13. August 2009

Beiträge: 680

Wohnort: Berlin

xabbuh schrieb:

Verstehe ich jetzt nicht. Hast Du die Datei jetzt gerade in einen vollständigen VHost geändert oder war sie vorher auch schon komplett?

die ist die ganze zeit so komplett, sie ist durch kopieren der 000-default mit den notwendigen namens- und servername und alias- und homepages-Äanderungen entstanden, der ganze logfile .... ist identisch mit der 000-default.

In meinen Beiträgen zitiere ich nur die wichtigen Zeilen.

Nils3

Anmeldungsdatum:
30. September 2013

Beiträge: 30

Ob das ein Fehler ist, kann ich dir nicht sagen. Aber diese Dateien befinden sichbei mir in conf.d :

- Charset
- javascript-common.conf
- localized-error-pages
- other-vhosts-access-log
- phpmyadmin.conf
- security

vielleicht hilfts ja weiter ..

edit:

?? wo is den sein post hin ...

agschaal

(Themenstarter)

Anmeldungsdatum:
13. August 2009

Beiträge: 680

Wohnort: Berlin

bei mir bringt ls -l folgendes:

buddha@buddha-mobil:/etc/apache2$ ls -l
insgesamt 92
-rw-r--r-- 1 root root  7132 Sep 30 14:41 apache2.conf
-rw-r--r-- 1 root root  7132 Sep 30 14:39 apache2.conf~
-rw-r--r-- 1 root root  7134 Sep 30 14:33 apache2.conf.old
drwxr-xr-x 2 root root  4096 Sep 29 19:23 conf-available
drwxr-xr-x 2 root root  4096 Sep 29 19:10 conf-enabled
-rw-r--r-- 1 root root  1782 Jul 20 22:44 envvars
-rw-r--r-- 1 root root 31063 Jul 20 22:44 magic
drwxr-xr-x 2 root root  4096 Sep 30 15:06 mods-available
drwxr-xr-x 2 root root  4096 Sep 30 15:06 mods-enabled
-rw-r--r-- 1 root root   317 Sep 30 17:19 ports.conf
-rw-r--r-- 1 root root   337 Sep 30 17:18 ports.conf~
drwxr-xr-x 2 root root  4096 Okt  3 03:42 sites-available
drwxr-xr-x 2 root root  4096 Okt  2 17:51 sites-enabled

ich werde jetzt mal die SSD anklemmen und ein neues saucy auf einem stick installieren und dann versuchen, einen funktionierenden apache hinzubekommen, ich melde mich heute abend zurück

as

xabbuh Team-Icon

Anmeldungsdatum:
25. Mai 2006

Beiträge: 6411

Was hast Du denn an der apache2.conf geändert? Kannst Du mal bitte deren Inhalt zeigen?

agschaal

(Themenstarter)

Anmeldungsdatum:
13. August 2009

Beiträge: 680

Wohnort: Berlin

Erst einmal, ich habe gerade eine völlige neuinstall auf einem stick gemacht, der Fehler a2ensite bleibt.

in der /etc/apache2/apache2.conf habe ich nur die Zeile "Servername localhost" eingefügt. Aber wie gesagt, bei einer reinen Neuinstallation ohne Änderung ist der Fehler nachvollziehbar.

Hier die komplette apche2.conf

# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#	/etc/apache2/
#	|-- apache2.conf
#	|	`--  ports.conf
#	|-- mods-enabled
#	|	|-- *.load
#	|	`-- *.conf
#	|-- conf-enabled
#	|	`-- *.conf
# 	`-- sites-enabled
#	 	`-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
#   together by including all remaining configuration files when starting up the
#   web server.

#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, or virtual host configurations,
#   respectively.
#
#   They are activated by symlinking available configuration files from their
#   respective *-available/ counterparts. These should be managed by using our
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
#   the default configuration, apache2 needs to be started/stopped with
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
#   work with the default configuration.


# Global configuration
#
ServerName localhost
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
Mutex file:${APACHE_LOCK_DIR} default

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5


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

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn

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

# Include list of ports to listen on
Include ports.conf


# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
	Options FollowSymLinks
	AllowOverride None
	Require all denied
</Directory>

<Directory /usr/share>
	AllowOverride None
	Require all granted
</Directory>

<Directory /var/www/>
	Options Indexes FollowSymLinks
	AllowOverride None
	Require all granted
</Directory>

#<Directory /srv/>
#	Options Indexes FollowSymLinks
#	AllowOverride None
#	Require all granted
#</Directory>


# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
	Require all denied
</FilesMatch>


#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
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 of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

as

war ein geiler Gedanke, den eigentlichen Fehler habe ich gefunden!!!!

Beim neuen Apache heißt die Konfiguration nicht mehr wie früher default, sondern 000-default.conf. Und diese Endung war bisher das, was ein enablen verhinderte. ein Umbenennen in testsite.conf und ein a2ensite testsite.conf sagte : OK

Er löst zwar noch nicht richtig auf, aber das wird nicht so schwer sein. rausgefunden habe ich es in der apache2.conf, wo ich include /sites-enabled*.conf las.

Ich weis noch nicht, ob das alles war, aber das Hauptproblem war die Routine der bisherigen Einrichtung zu ...... .conf

Danke für die Hilfe, falls ich es nicht hinbekomme schreib ich weiter.

as

xabbuh Team-Icon

Anmeldungsdatum:
25. Mai 2006

Beiträge: 6411

Die VHost Konfigurationsdateien müssen jetzt anscheinend auch mit .conf enden.

agschaal

(Themenstarter)

Anmeldungsdatum:
13. August 2009

Beiträge: 680

Wohnort: Berlin

Ja, das war der Fehler und ist jetzt die Lösung.

Ich weiß nur nicht, ob man das ins wiki oder so reinschreiben sollte. Ich kann mir vorstellen, das es anderen auch so geht.

Und welche Installationsroutinen das nutzen.

Etherpad lite legt sich auf localhost:9001, aber wie weis ich aus dem Kopf nicht.

Es gab aber webanwendungen, die ihren eigenen v-Host anlegten.

Soll ich das noch irgendwo dokumentieren?

Sag mir wo.

as

Noch etwas ist neu, ich komme an meine bisherigen Seiten derzeit noch nicht ran, weil .htacces aktiviert ist. Das war vorher auch nicht.

Ich setze den Beitrag erst auf gelöst, wenn ich alle Änderungen hier dokumentiert habe. OK?????

Antworten |