Apache default-Host aendern !?

G

Gentfloo

#470425
Hi Community

Ich moechte den default-host von Apache aendern und zwar auf das Verzeichnis /var/www/default,
versuche dies schon seit Stunden :(

(Gentoo, Apache 2.2.4)

/etc/apache/httpd.conf
Code:
Include /etc/apache2/modules.d/modules.load
Include /etc/apache2/modules.d/*.conf
#Include /etc/apache2/modules.d/mod_security/*.conf
Include /etc/apache2/vhosts.d/*.conf

#--------------------------#
# Allgemeine Einstellungen #
#--------------------------#

ServerAdmin linuxrechner.tld@web.de
ServerName linuxrechner.tld
#DocumentRoot "/var/www/default/htdocs"

ServerRoot "/usr/lib/apache2"
PidFile "/var/run/apache2.pid"

User apache
Group apache

DirectoryIndex index.*

SecServerSignature " "

# Standard / globale Logs
ErrorLog logs/global_apache_error.log
CustomLog logs/global_apache_access.log common

#-------------------------------------#
# maneull angelegte VServer einbinden #
#-------------------------------------#

Include /etc/apache2/vhosts.d/vhosts.load

#<Location ^*/phpmyadmin/>
#       SecFilter               "select.+from"
#       SecFilterSelective      "HTTP_CONTENT_TYPE" multipart/form-data
#</Location>
/etc/apache2/vhosts.d/00_default_vhost.conf
Code:
<IfDefine DEFAULT_VHOST>

Listen 80
NameVirtualHost *:80

#<VirtualHost *:80> ############### auch schon mit der Derektive versucht

<VirtualHost _default_:80>

   ServerAdmin root@irgendwas
   #ServerName [url]www.example.com:80[/url]
   DocumentRoot "/var/www/default/htdocs"

<Directory "/var/www/default/htdocs">
        Options         -Indexes FollowSymLinks
        AllowOverride   All
        Order           allow,deny
        Allow           from all
</Directory>

        <IfModule mpm_peruser_module>
                ServerEnvironment apache apache
        </IfModule>

</VirtualHost>
</IfDefine>

Die localhost-Section im Apache will ich NUR fuer meinen PC verwenden;
die "It Works Page" (zB) und Aliase fuer den localhost sollen NICHT nach aussen.

Also ....
Code:
#
# VHost: localhost
#
<Directory "/var/www/localhost/htdocs">
        AllowOverride   All
        Options         Indexes FollowSymLinks MultiViews Includes
        Order           allow,deny
        Allow           from localhost 127.0.0.1
        Deny            from all
</Directory>

ScriptAlias /cgi-bin/ "/var/www/localhost/cgi-bin/"
<Directory "/var/www/localhost/cgi-bin">
        AllowOverride   None
        Options         None
        Order           allow,deny
        Allow           from localhost 127.0.0.1
        Deny            from all
</Directory>

<Directory "/var/www/localhost/htdocs/phpmyadmin">
        AllowOverride   None
        Options         FollowSymLinks Indexes
        Order           allow,deny
        Allow           from localhost 127.0.0.1
        Deny            from all
</Directory>

<VirtualHost *:80>
        ServerAdmin     root@localhost
        DocumentRoot    "/var/www/localhost/htdocs/"
        ServerName      localhost
        Serveralias     localhost
</VirtualHost>

Ich hoffe ihr koennt mir helfen :,)
 
Du mußt das DocumentRoot auf den gewünschten Ordner setzen.
 
Okay hat sich erledigt...

Hab nach quasie Anleitung im gentoo-apache Freenode.net Irc-channel
Apache reconfiguriert und die "/etc/apache2/vhosts.d/default_vhost.include", nur die :-), bearbeitet.

THx an dieser Stelle nochmal...
 

Ähnliche Themen

NGINX bietet intern abgerufene Seiten nur zum Download an, extern geht's

Nginx als Reverse Proxy für Nextcloud und Emby

Zugriff Ubuntu 16.04. auf Freigabe 18.04. LTS nicht möglich

Probleme mit virtual hosts

nginx owncloud, php? Problem

Zurück
Oben