Goedendag,
Ik heb een vraag mbt een virtual host config file.
Virtual hosts gaan op dit moment goed, alleen om dit alles in de httpd.conf te zetten is niet handig, bij veel domeinen.
Nu heb ik op de site van apache gekeken naar een externe file waar deze hosts in staan.
Dit werkt niet
Relevante code httpd.conf
httpd-access.log
[log]
195.x.x.x - - [08/Sep/2003:14:55:49 +0000] "GET /10-1.gif HTTP/1.1" 200 8388 "http://www2.xx.net/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)"
[/log]
httpd-error.log
[log]
[Mon Sep 8 14:55:04 2003] [notice] caught SIGTERM, shutting down
[Mon Sep 8 14:55:07 2003] [notice] Apache/1.3.27 (Unix) PHP/4.3.1 configured -- resuming normal operations
[Mon Sep 8 14:55:07 2003] [notice] Accept mutex: flock (Default: flock)
[/log]
Ik heb een vraag mbt een virtual host config file.
Virtual hosts gaan op dit moment goed, alleen om dit alles in de httpd.conf te zetten is niet handig, bij veel domeinen.
Nu heb ik op de site van apache gekeken naar een externe file waar deze hosts in staan.
Dit werkt niet
Relevante code httpd.conf
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| RewriteEngine on
RewriteMap lowercase int:tolower
# define the map file
RewriteMap vhost txt:/www/conf/vhost.map
# deal with aliases as above
RewriteCond %{REQUEST_URI} !^/icons/
RewriteCond %{REQUEST_URI} !^/cgi-bin/
RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
# this does the file-based remap
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/docs/$1
RewriteCond %{REQUEST_URI} ^/cgi-bin/
RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/cgi-bin/$1 |
httpd-access.log
[log]
195.x.x.x - - [08/Sep/2003:14:55:49 +0000] "GET /10-1.gif HTTP/1.1" 200 8388 "http://www2.xx.net/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)"
[/log]
httpd-error.log
[log]
[Mon Sep 8 14:55:04 2003] [notice] caught SIGTERM, shutting down
[Mon Sep 8 14:55:07 2003] [notice] Apache/1.3.27 (Unix) PHP/4.3.1 configured -- resuming normal operations
[Mon Sep 8 14:55:07 2003] [notice] Accept mutex: flock (Default: flock)
[/log]