Apache2: vhost problem (mal wieder)

Alles, was den Apache betrifft, kann hier besprochen werden.

Apache2: vhost problem (mal wieder)

Postby testthewest » 08. February 2005 14:39

hi =)

also, ich habe heute apache2 installiert und folgende configs:

default-server.conf:

Code: Select all
DocumentRoot "/srv/www/htdocs"
<Directory />
    AuthUserFile  /etc/httpd/passwd
    AuthGroupFile /etc/httpd/group
    Options None
    Allow from all
</Directory>
<Directory "/srv/www/htdocs">
Options FollowSymLinks +Includes
Order allow,deny
Allow from all
<Files /srv/www/htdocs/index.htm*>
   Options +Includes
</Files>
</Directory>
<IfModule mod_dir.c>
   DirectoryIndex index.php index.html index.htm  index.cgi index.pl index.phtml
</IfModule>

# 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
<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
   # You can, however, change the ~ if you find it awkward, by mapping e.g.
   # http://www.example.com/users/karl-heinz/ --> /home/karl-heinz/public_html/
   #AliasMatch ^/users/([a-zA-Z0-9-_.]*)/?(.*) /home/$1/public_html/$2
</IfModule>

Alias /phpMyAdmin /srv/www/htdocs/phpMyAdmin
<DirectoryMatch /srv/www/htdocs/phpMyAdmin/>
Options None
AllowOverride None
order allow,deny
allow from all
</DirectoryMatch>
<Directory "/srv/www/htdocs/confixx/html">
</Directory>
Include /etc/apache2/conf.d/*.conf
Include /etc/apache2/conf.d/apache2-manual?conf



httpd.conf:

Code: Select all
### Global Environment ######################################################
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests.

# run under this user/group id
Include /etc/apache2/uid.conf

# - how many server processes to start (server pool regulation)
# - usage of KeepAlive
Include /etc/apache2/server-tuning.conf

# 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 /var/log/apache2/error_log

# generated from APACHE_MODULES in /etc/sysconfig/apache2
Include /etc/apache2/sysconfig.d/loadmodule.conf

# IP addresses / ports to listen on
Include /etc/apache2/listen.conf

# predefined logging formats
Include /etc/apache2/mod_log_config.conf

# generated from global settings in /etc/sysconfig/apache2
Include /etc/apache2/sysconfig.d/global.conf

# optional mod_status, mod_info
Include /etc/apache2/mod_status.conf
Include /etc/apache2/mod_info.conf

# optional cookie-based user tracking
# read the documentation before using it!!
Include /etc/apache2/mod_usertrack.conf

# configuration of server-generated directory listings
Include /etc/apache2/mod_autoindex-defaults.conf

# associate MIME types with filename extensions
TypesConfig /etc/apache2/mime.types
DefaultType text/plain
Include /etc/apache2/mod_mime-defaults.conf

# set up (customizable) error responses
Include /etc/apache2/errors.conf

# global (server-wide) SSL configuration, that is not specific to
# any virtual host
Include /etc/apache2/ssl-global.conf

# forbid access to the entire filesystem by default
<Directory />
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
    Order allow,deny
    Allow from all
</Files>

# List of resources to look for when the client requests a directory
DirectoryIndex index.html index.html.var

### 'Main' server configuration #############################################
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
Include /etc/apache2/default-server.conf


# Another way to include your own files
#
# The file below is generated from /etc/sysconfig/apache2,
# include arbitrary files as named in APACHE_CONF_INCLUDE_FILES and
# APACHE_CONF_INCLUDE_DIRS
Include /etc/apache2/sysconfig.d/include.conf


### Virtual server configuration ############################################
#
# VirtualHost: 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.0/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.
#
Include /etc/apache2/vhosts.d/*.conf


# Note: instead of adding your own configuration here, consider
#       adding it in your own file (/etc/apache2/httpd.conf.local)
#       putting its name into APACHE_CONF_INCLUDE_FILES in
#       /etc/sysconfig/apache2 -- this will make system updates
#       easier :)



listen.conf:

Code: Select all
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports. See also the <VirtualHost> directive.
#
# http://httpd.apache.org/docs-2.0/mod/mpm_common.html#listen
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
# When we also provide SSL we have to listen to the
# standard HTTP port (see above) and to the HTTPS port
#
# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
#       Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"
#
#Listen 12.34.56.78:80
#Listen 80
#Listen 443

Listen 80


<IfDefine SSL>
    <IfDefine !NOSSL>
   <IfModule mod_ssl.c>

       Listen 443

   </IfModule>
    </IfDefine>
</IfDefine>

NameVirtualHost 80.190.249.126:80




1. vhost (der geht) conf:

Code: Select all
<Directory "/srv/www/htdocs">
AllowOverride None
Options +ExecCGI
Order Allow,Deny
Allow from all
</Directory>
<VirtualHost 80.190.249.126:80>
ServerName www.1.net
ServerAlias  www.1.net 1.net web1.1.net
DocumentRoot /srv/www/htdocs/web1/html
DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi
SuexecUserGroup web1 ftponly
CustomLog /srv/www/htdocs/web1/log/access_log confixx2
ScriptAlias /cgi-bin/ /srv/www/htdocs/web1/html/cgi-bin/
php_admin_value open_basedir /srv/www/htdocs/web1/
php_admin_value upload_tmp_dir /srv/www/htdocs/web1/phptmp/
php_admin_flag register_globals on
php_admin_flag safe_mode Off
<Directory "/srv/www/htdocs/web1/html">
SetOutputFilter DEFLATE
AllowOverride None
php_value arg_separator.output &amp;
ExpiresActive on
ExpiresDefault A65
ExpiresByType image/gif A6592000
ExpiresByType image/png A6592000
ExpiresByType image/jpg A6592000
ExpiresByType text/css A6592000
ExpiresByType text/html A65
ExpiresByType  application/x-shockwave-flash A5592000
<Files ~ "\.(js|css|gif|jpe?g|png)$">
Header append Cache-Control "public"
</Files>
RewriteEngine  on
RewriteBase /
RewriteRule ^$                  modules/cjaycontent                                    [L]
RewriteRule ^/$                 modules/cjaycontent                                    [L]
RewriteRule ^index.php$        modules/cjaycontent                                      [L]
RewriteRule ^index.html$        modules/cjaycontent                                       [L]
RewriteRule ^news.html$      modules/cjaycontent                                    [L]
RewriteRule ^downloads.html$   modules/wfdownloads                             [L]
RewriteRule ^membres.html$   modules/xoopsmembers                            [L]
RewriteRule ^contact.html$   modules/contact                                 [L]
RewriteRule ^reviews.html$   http://www.overclocker.nl              [L]
RewriteRule ^geekster/forum.html$   geekster/index.php?action=index            [L]
RewriteRule ^modules/tinycontent/support.html$   modules/tinycontent/index.php?id=4            [L]
RewriteRule ^modules/wfdownloads/downloadtop10.html$   modules/wfdownloads/topten.php?hit=1            [L]
RewriteRule ^modules/wfdownloads/saug-([0-9]+)-([0-9]+).html     modules/wfdownloads/visit.php?cid=$1&lid=$2     [L]
RewriteRule ^modules/wfdownloads/downloads-cat-([0-9]+).html$                 modules/wfdownloads/viewcat.php?cid=$1                  [L]
RewriteRule ^modules/wfdownloads/downloads-([0-9]+)-([0-9]+).html$              modules/wfdownloads/singlefile.php?cid=$1&lid=$2   [L]
RewriteRule ^modules/wfdownloads/downloads-page-([0-9]+)-([0-9]+)-(.*)-([0-9]+).html$   modules/wfdownloads/viewcat.php?cid=$1&min=$2&orderby=$3&show=$4   [L]
RewriteRule ^neuethemen.html$     geekster/SSI3.php?ssi_function=recentPosts  [L]
RewriteRule ^modules/wfdownloads/file-(.*)-([0-9]+)-([0-9]+).html$              modules/wfdownloads/singlefile.php?cid=$2&lid=$3#   [QSA,L]
</Directory>
<Directory "/srv/www/htdocs/web1/html/ge1">
SetOutputFilter DEFLATE
AllowOverride None
php_value arg_separator.output &amp;
ExpiresActive on
ExpiresDefault A60
ExpiresByType image/gif A5592000
ExpiresByType image/png A5592000
ExpiresByType image/jpg A5592000
ExpiresByType text/css A5592000
ExpiresByType text/html A60
ExpiresByType  application/x-shockwave-flash A5592000
<Files ~ "\.(js|css|gif|jpe?g|png)$">
Header append Cache-Control "public"
</Files>
RewriteEngine On
RewriteBase /geekster
RewriteRule ^forum.html$   index.php?action=index    [L]
RewriteRule ^infoportal.html$   infoportal.php    [L]
</Directory>
</VirtualHost>



2. vhost (der geht) .conf:

Code: Select all
<VirtualHost 80.190.249.126:80>
ServerName www.2.info
ServerAlias  web2.s2.server.de www.s2.info s2.info
DocumentRoot /srv/www/htdocs/web2/html
<Directory "/srv/www/htdocs/web2/html">
AllowOverride None
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME}   !-s
RewriteRule ^.*\.html loadpage.php [L]
RewriteRule ^$ loadpage.php [L]
ExpiresActive on
ExpiresDefault A60
ExpiresByType image/gif A5592000
ExpiresByType image/png A5592000
ExpiresByType image/jpg A5592000
ExpiresByType text/css A5592000
ExpiresByType text/html A60
ExpiresByType  application/x-shockwave-flash A5592000
<Files ~ "\.(js|css|gif|jpe?g|png)$">
Header append Cache-Control "public"
</Files>
</Directory>
ScriptAlias /cgi-bin/ /srv/www/htdocs/web2/html/cgi-bin/
php_admin_value open_basedir /srv/www/htdocs/web2/
php_admin_value upload_tmp_dir /srv/www/htdocs/web2/phptmp/
</VirtualHost>


bei diesem vhost kommt aber dann kein zugriff, und ich weiß einfach nicht wieso..?

vhost conf:

Code: Select all
<VirtualHost 80.190.249.126:80>
ServerName web5.s5.server.de
ServerAlias  web5.s5.server.de
DocumentRoot /srv/www/htdocs/web5/html
ScriptAlias /cgi-bin/ /srv/www/htdocs/web5/html/cgi-bin/
php_admin_value open_basedir /srv/www/htdocs/web5/
php_admin_value upload_tmp_dir /srv/www/htdocs/web5/phptmp/
<Directory "/srv/www/htdocs/web5/html">
AllowOverride None
php_value arg_separator.output &amp;
ExpiresActive on
ExpiresDefault A65
ExpiresByType image/gif A6592000
ExpiresByType image/png A6592000
ExpiresByType image/jpg A6592000
ExpiresByType text/css A6592000
ExpiresByType text/html A65
ExpiresByType  application/x-shockwave-flash A5592000
<Files ~ "\.(js|css|gif|jpe?g|png)$">
Header append Cache-Control "public"
</Files>
</Directory>
<Directory "/srv/www/htdocs/web5/html/bild">
AllowOverride None
ExpiresActive on
ExpiresDefault A80
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType text/css A2592000
ExpiresByType text/html A2592000
ExpiresByType  application/x-shockwave-flash A2592000
RewriteEngine On
RewriteBase /bild
RewriteRule ^index.html$ index.php [L,NE]
RewriteRule ^index([0-9]+).html$ index.php?cat=$1 [L,NE]
RewriteRule ^thumbnails([0-9]+).html$ thumbnails.php?album=$1 [L,NE]
RewriteRule ^thumbnails_([a-z]+).html$ thumbnails.php?album=$1 [L,NE]
RewriteRule ^thumbnails_([a-z]+)_(-[0-9]+|[0-9]+).html$ thumbnails.php?album=$1&cat=$2 [L,NE]
RewriteRule ^thumbnails_last([a-z]+)_([0-9]+).html$ thumbnails.php?album=last$1&uid=$1 [L,NE]
RewriteRule ^thumbnailspage_([a-z]+)_([0-9]+)_([0-9]+).html$ thumbnails.php?album=$1&cat=$2&page=$3 [L,NE]
RewriteRule ^thumbnailspage_([0-9]+)_([0-9]+).html$ thumbnails.php?album=$1&page=$2 [L,NE]
RewriteRule ^thumbnailspage_([a-z]+)_(-[0-9]+|[0-9]+)_([0-9]+).html$ thumbnails.php?album=$1&cat=$2&page=$3 [L,NE]
RewriteRule ^displayimage_([0-9]+)_([0-9]+).html$ displayimage.php?album=$1&pos=$2 [L,NE]
RewriteRule ^displayimage_([a-z]+)_(-[0-9]+|[0-9]+)_(-[0-9]+|[0-9]+).html$ displayimage.php?album=$1&cat=$2&pos=$3 [L,NE]
RewriteRule ^displayfullimage_([0-9]+)_([0-9]+).html$ displayimage.php?pid=$1&fullsize=$2 [L,NE]
RewriteRule ^profile([0-9]+).html$ profile.php?uid=$1 [L,NE]
RewriteRule ^find_([a-z]+)_([a-z]+|[A-Z]+).html$ thumbnails.php?album=$1&search=$2 [L,NE]
RewriteRule ^photo_(-[0-9]+|[0-9]+).html$ displayimage.php?pos=$1 [L,NE]
RewriteRule ^addtofav_(-[0-9]+|[0-9]+).html$ addfav.php?pid=$1 [L,NE]
RewriteRule ^remfrmfav_(-[0-9]+|[0-9]+).html$ addfav.php?pid=$1 [L,NE]
RewriteRule ^ratepic_(-[0-9]+|[0-9]+)_([0-9]+).html$ ratepic.php?pic=$1&rate=$2 [L,NE]
RewriteRule ^slideshow_([0-9]+)_([0-9]+)_([0-9]+).html$ displayimage.php?album=$1&pid=$2&slideshow=$3 [L,NE]
RewriteRule ^slideshow_([0-9]+|[a-z]+)_([0-9]+)_([0-9]+)_([0-9]+).html$ displayimage.php?album=$1&cat=$2&pid=$3&slideshow=$4 [L,NE]
</Directory>
<Directory "/srv/www/htdocs/web5/html/art">
AllowOverride None
php_value arg_separator.output &amp;
RewriteEngine  on
RewriteBase /art
RewriteRule ^index.html$       index.php                                       [L]
RewriteRule ^artikel-kategorie-([0-9]+)-(.*).html$   index.php?c=$1   [L]
RewriteRule ^artikel-lesen-([0-9]+)-(.*).html$   index.php?e=$1   [L]
RewriteRule ^kategorien.html$ index.php?act=cat   [L]
RewriteRule ^kategorie-([0-9]+).html$ index.php?c=$1   [L]
RewriteRule ^suchen.html$ index.php?act=search   [L]
RewriteRule ^artikel-lesen-([0-9]+).html$   index.php?e=$1   [L]
</Directory>
</VirtualHost>


ich hoffe, jemand von euch, der sich sicherlich besser auskennt, weiß rat...? und sorry, ich weiß schon, schon wieder ne vhost frage aber ich hab jetzt paar stunden rumprobiert und bekomm es einfach nicht hin :/
testthewest
 
Posts: 1
Joined: 02. February 2005 20:29

Return to Apache

Who is online

Users browsing this forum: No registered users and 103 guests