다른 게시물을 통해 읽었지만 질문에 대한 답을 얻지 못했습니다. 와일드 카드 도메인의 와일드 카드 도메인을 가질 수 있습니까 (예 : 하위 도메인이든 하위 하위 도메인이든) : foo.example.local. 이미 example.local이 작동하지만 foo.example.local을/example 폴더 내의/sub/foo 폴더에서 가져 오는 방법을 알아낼 수 없습니다. 이 순간에 내 설정 (아파치 - vhost.conf) :Xampp Virtualhost : 와일드 카드 도메인 및 하위 도메인
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "C:/xampp/www"
ServerName localhost
ServerAlias localhost
</VirtualHost>
<Virtualhost *:80>
VirtualDocumentRoot "C:/xampp/www/%-2"
ServerName domain.local
ServerAlias *.local
<Directory "C:/xampp/www/*">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</Virtualhost>
<Virtualhost *:80>
VirtualDocumentRoot "C:/xampp/www/%-2/sub/%-3"
ServerName sub.domain.local
ServerAlias *.*.local
<Directory "C:/xampp/www/*/sub/*">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</Virtualhost>
어떤 일이 발생하면 foo.example.local는 단순히 예/부/foo는 폴더에 예제 폴더로 이동하지 것입니다 내가 원하는 걸.
아, 그리고 난 이미 활성화 :
- 127.0.0.1 example.local는
- 127.0.0.1 foo.example.local : httpd.conf를 내
LoadModule vhost_alias_module modules/mod_vhost_alias.so
는
호스트 파일은 두 줄이 포함