Kezdőlap › Fórumok › Debiannal kapcsolatos kérdések › apache2 rewrite
- This topic has 14 hozzászólás, 5 résztvevő, and was last updated 17 years, 10 months telt el by
kisbetu.
-
SzerzőBejegyzés
-
2007-08-25-20:56 #2129595
Ehhez inkább ezt olvasgasd.
# 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
#
# for further details before you try to setup virtual hosts.2007-08-25-20:56 #2129596Ehhez inkább ezt olvasgasd.
# 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
#
# for further details before you try to setup virtual hosts.2007-08-25-21:10 #2129597Okés köszi megpróbálom. .de ha vki tudna konrét conf pl -t beírni nekem ide annak nagyon oulnek..
2007-08-25-21:10 #2129598Okés köszi megpróbálom. .de ha vki tudna konrét conf pl -t beírni nekem ide annak nagyon oulnek..
2007-08-25-22:02 #2129599Tessék, itt egy konkrét példa az én megoldásomhoz.
Code:NameVirtualHost xy.sytes.net:80ServerName XY
DocumentRoot „/var/www/html/xy”
ErrorLog „/var/log/apache2/xy_error_log”
TransferLog „/var/log/apache2/xy_acces_log”
AllowOverride none
AllowOverride AuthConfig
Options Indexes FollowSymLinks
NameVirtualHost xyz.sytes.net:80
ServerName xyz
DocumentRoot „/var/www/html/xyz”
ErrorLog „/var/log/apache2/xyz_error_log”
TransferLog „/var/log/apache2/xyz_acces_log”
AllowOverride none
Options Indexes FollowSymLinks
2007-08-25-22:02 #2129600Tessék, itt egy konkrét példa az én megoldásomhoz.
Code:NameVirtualHost xy.sytes.net:80ServerName XY
DocumentRoot „/var/www/html/xy”
ErrorLog „/var/log/apache2/xy_error_log”
TransferLog „/var/log/apache2/xy_acces_log”
AllowOverride none
AllowOverride AuthConfig
Options Indexes FollowSymLinks
NameVirtualHost xyz.sytes.net:80
ServerName xyz
DocumentRoot „/var/www/html/xyz”
ErrorLog „/var/log/apache2/xyz_error_log”
TransferLog „/var/log/apache2/xyz_acces_log”
AllowOverride none
Options Indexes FollowSymLinks
2007-08-28-10:25 #2129601hm koszi, nekem így seikerult és miden domain autómatikusan vhosotlva van, és miden aldomain is. : ) és ezenkívul csak a egy script kell hogy az /usr/local/bin/ -be hogy parancsal hozzáadam a domaint és aldoamint 🙂 ha kell vkinek beírom.
Code:NameVirtualHost *ServerName domain.at
ServerAlias domain.at
DocumentRoot /var/www/domain.at/ErrorLog /var/log/apache2/error-domain.log
LogLevel warn
CustomLog /var/log/apache2/access-domain.log combined
ServerSignature Off
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride AuthConfig Options FileInfo Limit
Order allow,deny
allow from all
Auth_MySQL_Info localhost // akinek nem kell kometezze ki kb.. : )
ReWriteEngine ON / lényeg! : )
RewriteMap lowercase int:tolower
# if subdomain already given
RewriteCond %{HTTP_HOST} ^([^.]+).([^.]+).([^azAZ]+)$
RewriteRule ^(.*)$ /var/www/%2.%3/%1$1 [E=VHOST:${lowercase:%2.%3}]# ha nem ad meg a-t akkor bezony rewrite a www-re
RewriteCond %{HTTP_HOST} ^([^.]+).([^.]+)$2007-08-28-10:25 #2129602hm koszi, nekem így seikerult és miden domain autómatikusan vhosotlva van, és miden aldomain is. : ) és ezenkívul csak a egy script kell hogy az /usr/local/bin/ -be hogy parancsal hozzáadam a domaint és aldoamint 🙂 ha kell vkinek beírom.
Code:NameVirtualHost *ServerName domain.at
ServerAlias domain.at
DocumentRoot /var/www/domain.at/ErrorLog /var/log/apache2/error-domain.log
LogLevel warn
CustomLog /var/log/apache2/access-domain.log combined
ServerSignature Off
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride AuthConfig Options FileInfo Limit
Order allow,deny
allow from all
Auth_MySQL_Info localhost // akinek nem kell kometezze ki kb.. : )
ReWriteEngine ON / lényeg! : )
RewriteMap lowercase int:tolower
# if subdomain already given
RewriteCond %{HTTP_HOST} ^([^.]+).([^.]+).([^azAZ]+)$
RewriteRule ^(.*)$ /var/www/%2.%3/%1$1 [E=VHOST:${lowercase:%2.%3}]# ha nem ad meg a-t akkor bezony rewrite a www-re
RewriteCond %{HTTP_HOST} ^([^.]+).([^.]+)$2007-08-29-20:04 #2129603köszönöm még1x a segítséget, 1 nyitott kérdés azonban előttem áll, ha a user www-t üt be akkor is ugye a www mappát keresné, de én azt kivételnek szeretném, van erre esetleg parancs, hogy az haggya figyelmen kívül?
Előre is köszi
2007-08-29-20:04 #2129604köszönöm még1x a segítséget, 1 nyitott kérdés azonban előttem áll, ha a user www-t üt be akkor is ugye a www mappát keresné, de én azt kivételnek szeretném, van erre esetleg parancs, hogy az haggya figyelmen kívül?
Előre is köszi
-
SzerzőBejegyzés
- Be kell jelentkezni a hozzászóláshoz.
legutóbbi hsz