저는 작업중인 웹 응용 프로그램에서 하위 도메인을 사용하려고합니다. 나는이 혀를 http://net.tutsplus.com/tutorials/php/basecamp-style-subdomains-with-codeigniter/을 따라 나는 그것이 내 httpd.config 파일에 다음과 같은 내/etc/hosts 파일 내 URL을 추가 한 후 추가하여 로컬 작업을 얻을 수 있었다 지금 얻으려고내 서버에서 작동하는 하위 도메인을 얻으려고합니다.
<VirtualHost *:80>
DocumentRoot "/Users/username/Sites/snapGiftApp"
ServerName snapgiftapp.com
ServerAlias snapgiftapp.com
<Directory "/Users/username/Sites/snapGiftApp">
Options -Indexes
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/Users/username/Sites/snapGiftApp"
ServerName snapgiftapp.com
ServerAlias *.snapgiftapp.com
<Directory "/Users/username/Sites/snapGiftApp">
Options -Indexes
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
내 서버에서 작동하고 하위 도메인 작업을 수행 할 수 없습니다. http://snapgiftapp.com으로 이동하면 방문 페이지가 잘 보입니다. http://subdomain.snapgiftapp.com으로 이동하면 오류 페이지가 표시됩니다.
나는 나의 DNS에 와일드 카드 하위 도메인을 추가했고 난 내 httpd.config 파일에 다음을 추가 한 내가 잘못 뭐하는 거지 http://subdomain.snapgiftapp.com
<VirtualHost *:80>
DocumentRoot "/home/snapgift"
ServerName snapgiftapp.com
ServerAlias snapgiftapp.com
<Directory "/home/snapgift">
Options -Indexes
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/home/snapgift"
ServerName snapgiftapp.com
ServerAlias *.snapgiftapp.com
<Directory "/home/snapgift">
Options -Indexes
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
를 볼 때 내가 여전히 오류를 받고 있어요 이 작동하지 않는 서버에? 디렉토리의 전체 경로를 제공해야합니까? 즉/var/www/etc/etc ..?